compiling C++ in the toolchain.

Juan Alberto Aranda Alvarez jaranda at openmoko.org
Wed Jan 14 18:49:21 CET 2009


One question, which wiki is the one you used as reference? is it the
toolchain wiki page?

The issue is the way you have autotools configured for the project.

Let's suppose I followed the wiki page:
http://wiki.openmoko.org/wiki/Toolchain#How_to_create_your_own_project_from_the_sample_project

The issue is modifying 2 files: configure.ac and src/Makefile.am

AC_CONFIG_SRCDIR(src/main.c) <-- change here to main.cpp

In configure.ac you have to replace AC_PROG_CC for AC_PROG_CXX.

in the file src/Makefile.am you replace the file main.c for main.cpp

This way it will use the Toolchain's C++ compiler.

I found this link to be very helpful :

http://www.openismus.com/documents/linux/automake/automake.shtml

Hope it helps.

Juan Aranda.



More information about the devel mailing list