building c++ for openmoko

Tabosa Maren Tabosa.Maren at gmx.net
Thu May 8 12:20:13 CEST 2008


On Wed, 07 May 2008 08:00:40 -0000, Holger Freyther <zecke at openmoko.org>  
wrote:

> On Wednesday 07 May 2008 03:25:57 Tabosa Maren wrote:
>> hello,
>> i'm new to openmoko and building applications with autotools. i followed
>> the tutorial for the usage of the toolchain at
>> http://wiki.openmoko.org/wiki/Toolchain and modified the example
>> application "openmoko-sample2" accordingly. however i don't like  
>> writing c
>> code and would prefer to use c++. so i simply changed the fileextension  
>> of
>> my sourcefile to cc and reran om-conf.
>> the resulting project didn't compile, because the configuration system  
>> no
>> longer supplied the necessary include pathes (e.g. the one for gtk).  
>> what
>> do i have to modify, to make the build system work with c++ ?
>
> Hey,
> you want to update the Makefile.am as well and put some of the CFLAGS  
> into
> CPPFLAGS or CXXFLAGS...
>
> z.

thanks, that worked.
i added @DEPENDENCIES_CFLAGS@ to AM_CPPFLAGS and magicly the buildsystem  
acquiered the headers for gtk. there is already a bunch of flags for  
c++ defined, but the @DEPENDENCIES_CFLAGS@ are only in the AM_CFLAGS. is  
there a specific reason ?
what also confuses me is, that the tutorial suggests adding of additional  
libraries in the Makefile.am in the progname_LDADD var. this works for  
linking but neither the gtk libraries are referenced there nor does the  
buildsystem use pkg-config for them to find the headers. where do i have  
to put them if i want the linker-/compilerflags to be generated by the  
buildsystem just like it is for gtk ?



More information about the openmoko-devel mailing list