[uClinux-dev] c++ problem undefined reference

Sascha Smejkal s.smejkal at centersystems.at
Thu Oct 27 07:25:53 EDT 2005


Hi all,

got a little further:

the difference between the two build environments is, that the 
uClinux-dist-20041215 uses the start files and libraries from the configured 
libc, whereas the old build environment used the start files from the 
toolchain for c++ applications.

Are there any fixes for the coldfire and uClinux-dist-20041215 to compile c++ 
apps with the m68k-elf-toolchain-20030314?

Another problem arose:

if I use global static variables which are (should be) initialized they 
sometimes don't get initialized when running the app. Has anyone encountered 
the same problem?

Thanks in advance

Sascha Smejkal
Sascha Smejkal schrieb:
> 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
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org



More information about the uClinux-dev mailing list