[uClibc]c++ compile fails...

Ivan Ng wkn at hknet.com
Fri Sep 20 02:09:47 UTC 2002


Hi:

I downloaded uClinux-dist-20020701 and compiled both the kernel and 
toolchains. I then tried to add my own application. I started with a 
simple C++ hello_world program to test the C++ support. It failed to 
compile. I receive the following errors:

make[2]: Entering directory `/opt/uc_newbuild/uClinux-dist/user/hello'
arm-elf-g++ -Os  -Dlinux -D__linux__ -Dunix -D__uClinux__ -DEMBED
-I/opt/uc_newbuild/uClinux-dist/lib/libc/include 
-I/opt/uc_newbuild/uClinux-dist/lib/libm -I/opt/uc_newbuild/uClinux-dist 
-fno-builtin -nostartfiles 
-I/opt/uc_newbuild/uClinux-dist/linux-2.0.x/include  
-fname-mangling-version-0   -c -o hello.o hello.cc
In file included from 
/opt/uc_newbuild/test/lib/gcc-lib/arm-elf/2.95.3/../../../../include/g++-3/libio.h:30,
                 from 
/opt/uc_newbuild/test/lib/gcc-lib/arm-elf/2.95.3/../../../../include/g++-3/streambuf.h:36,
                 from 
/opt/uc_newbuild/test/lib/gcc-lib/arm-elf/2.95.3/../../../../include/g++-3/iostream.h:31,
                 from hello.cc:1:
/opt/uc_newbuild/test/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/_G_config.h:44: 
syntax error before `;'
make[2]: *** [hello.o] Error 1
make[2]: Leaving directory `/opt/uc_newbuild/uClinux-dist/user/hello'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/uc_newbuild/uClinux-dist/user'
make: *** [subdirs] Error 1

Can any one help me? How do I know which library I'm compiling with 
(uC-libc or uClibc)? I followed the instruction on 
http://www.uclinux.org/pub/uClinux/archive/8306.html to install the 
distribution, so I guess I'm using the uClibc which should have full C++ 
support. Any help is appreciated.

thanks,

Ivan.




More information about the uClibc mailing list