[uClinux-dev] c++ problem undefined reference

Sascha Smejkal s.smejkal at centersystems.at
Mon Oct 24 10:19:31 EDT 2005


Hi,

We have an environment with many c++ apps. Until now we've used uClinux with 
kernel 2.4.17-ac1 (Arcturus), the "old" uC-libc and the toolchain from 20030314.

Now we want to update to uClinux-dist 20041215 with kernel 2.4.27-uc0 and the 
"new" uClibc included in the distro.

Now a problem arose by one of the many c++ applications. The linker exits with 
the following error:

echo CXXLIBS=-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -liostream -lio -liberty -lc 
-lgcc
CXXLIBS=-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -liostream -lio -liberty -lc -lgcc
/usr/local/bin/m68k-elf-g++ -m5307 -DCONFIG_COLDFIRE -Os -g 
-fomit-frame-pointer -m5307 -DCONFIG_COLDFIRE -fno-common -Wall   -Dlinux 
-D__linux__ -Dunix -D__uClinux__ -DEMBED -nostdinc 
-I/develop/projects/csp3000/wao/platform/include 
-I/develop/projects/csp3000/wao/platform/include/include -fno-builtin 
-msep-data -Wl,-elf2flt -Wl,-move-rodata -nostartfiles 
/develop/projects/csp3000/wao/platform/lib/crt0.o 
-L/develop/projects/csp3000/wao/platform/lib 
-L/develop/projects/csp3000/wao/platform/lib/zlib rpc_types.o rpc_rtc.o 
rpc_io.o rpc_tts.o rpc_device_control.o can_io.o tabcfg.o csp_timer.o bwz.o 
rtc.o trace.o devicemanager.o version.o csp_can_evts_sstub.o bwz_srvr_sstub.o 
io_cmds_cstub.o vr_cmds_cstub.o gctrl_cmds_cstub.o bwz_clnt_cstub.o 
../../lib/librpctrans.a -o bwz -lz -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic 
-liostream -lio -liberty -lc -lgcc
bwz.elf2flt: In function `_IO_file_stat':
/usr/local/lib/gcc-lib/m68k-elf/2.95.3/../../../../m68k-elf/sys-include/sys/stat.h:359: 
undefined reference to `__fxstat'
collect2: ld returned 1 exit status

I've googled around and found some others having the same problem but didn't a 
solution.

Is it solved in the meantime or has everybody given up?

Thanx in advance

Sascha Smejkal



More information about the uClinux-dev mailing list