[uClinux-dev] c++ problem undefined reference
s.smejkal at centersystems.at
Thu Oct 27 07:25:53 EDT 2005
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 schrieb:
> 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
> /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/include -fno-builtin
> -msep-data -Wl,-elf2flt -Wl,-move-rodata -nostartfiles
> -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':
> 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
> This message was resent by uclinux-dev at uclinux.org
More information about the uClinux-dev