-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2011-10-18 05:01, Patrice Colet wrote:
then you did something weird :-) i had the same problem after changing CC to CXX and replacing myobject.c with myobject.cpp
the template/Makefile is full of assumptions that the sources end with ".c"; to compile .cpp files, you will have to replace all the pattern substitutions throughout the makefile from %.c to %.cpp mainly you will find this in constructs like "$(SOURCES:.c=.o)" which need to be changed to "$(SOURCES:.cpp=.o)"
that's what I did, after changing all .c to .cpp and CC to CXX it compiles.
[...]
that's right, if I replace .c with .cpp in clean method, make doesn't remove .cpp files anymore, but it still removes the .tcl files
that is why i said 'constructs _like_ "$(SOURCES:.c=.o)"' rather than 'replace all occurences of ".c=.o" with ".cpp=.o"'
you really should go through the _entire_ Makefile and search for all ".c" (indicating filename suffixes...so check the context) and replace it with ".cpp". there might be occurences of ".c" that are not related to filename extensions so take care.
fgmasdr IOhannes