[uClinux-dev] trouble compiling shared libraries

David McCullough davidm at snapgear.com
Wed Mar 19 09:43:30 EST 2003

Jivin Justin Clacherty lays it down ...
> Hi,
> I'm having some trouble getting something to compile as a shared
> library.  Can anyone see what I'm doing wrong?  Here is the command that
> my makefile spits out along with the first few error messages.
> m68k-elf-g++ -shared -fPIC -O2 -Wall -D_REENTRANT -I../../
> -I/usr/local/include/ -m5307 -msep-data -D__UCLINUX__ -DTARGET -o
> libserialwrapper.so SerialWrapper.o NMEASerialWrapper.o
> /usr/local/m68k-elf/bin/ld.real: warning: cannot find entry symbol
> _start; defaulting to
> 80000074
> SerialWrapper.o: In function `LibSerial::SerialWrapper::Open(char const
> *)':
> SerialWrapper.o(.text+0xd6): undefined reference to `open'
> SerialWrapper.o(.text+0xec): undefined reference to `tcgetattr'

-shared will not work under uClinux,  so even if it did build you are toast :-)

If you want dynamic loading,  then you have some work to do to either
remove that requirement or find a way to implement it.

If you just want a shared lib,  look at the lib/libc/Makefile or
uClibc/Makefile to see how it can be done.  you will want to use a LIBID
of 2 or 3.


David McCullough:    Ph: +61 7 3435 2815  http://www.SnapGear.com
davidm at snapgear.com  Fx: +61 7 3891 3630  Custom Embedded Solutions + Security

More information about the uClinux-dev mailing list