Bug #10612 2007-03-12 17:32

bilboq

cannot compile SVN version (revision 3690)

./bootstrap and ./configure went fine, but:
code::blocks/trunk $ make
Making all in src
make[1]: Entering directory `/home/source/code::blocks/trunk/src'
Making all in base
make[2]: Entering directory `/home/source/code::blocks/trunk/src/base'
Making all in tinyxml
make[3]: Entering directory `/home/source/code::blocks/trunk/src/base/tinyxml'
if /bin/sh ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../../src/include -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA   -I../../../src/include/wxscintilla/include -I../../../src/include -I../../../src/include/tinyxml    -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -MT tinywxuni.lo -MD -MP -MF ".deps/tinywxuni.Tpo" -c -o tinywxuni.lo tinywxuni.cpp; \
        then mv -f ".deps/tinywxuni.Tpo" ".deps/tinywxuni.Plo"; else rm -f ".deps/tinywxuni.Tpo"; exit 1; fi
 g++ -DHAVE_CONFIG_H -I. -I. -I../../../src/include -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -I../../../src/include/wxscintilla/include -I../../../src/include -I../../../src/include/tinyxml -O2 -ffast-math -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -MT tinywxuni.lo -MD -MP -MF .deps/tinywxuni.Tpo -c tinywxuni.cpp  -fPIC -DPIC -o .libs/tinywxuni.o
../../../src/include/prep.h:59: error: expected unqualified-id before numeric constant
../../../src/include/prep.h:63: error: expected unqualified-id before numeric constant
make[3]: *** [tinywxuni.lo] Error 1
make[3]: Leaving directory `/home/source/code::blocks/trunk/src/base/tinyxml'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/source/code::blocks/trunk/src/base'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/source/code::blocks/trunk/src'
make: *** [all-recursive] Error 1
Category
Application::Error
Group
 
Status
Closed
Close date
2007-03-14 09:31
Assigned to
 
thomasdenk 2007-03-12 19:15

Known issue, ty for reporting.

The problem are two standard-violating macros:

linux and unix (the standard-conforming versions would be __linux__ and __unix__).

Since macros don't respect namespaces, they replace the text in the platform namespace too, which causes the error. As a temporary workaround (until we decide for the final solution) you can try inserting an #undef linux or rename the variable to something else (globally).

Sorry for the inconvenience.

biplab 2007-03-14 09:31

This issue has been fixed in Revision 3695. Thanks for reporting.