Linker error under FreeBSD

Hello

I installed SDL (1.2) from source and the fpc (FreePASCAL) bindings for
SDL on my FreeBSD 5.1 system.
When I try to compile a minimal sdl source code, I get this hugh list of
undefined references.
I dont post the whole error message, only a part: fpc demo1.pp /usr/X11R6/lib//libX11.so.6: undefined reference tostrpbrk’
/usr/X11R6/lib//libX11.so.6: undefined reference to ___tolower' /usr/local/lib//libSDL.so: undefined reference tofree’
/usr/X11R6/lib//libX11.so.6: undefined reference to `getsockname’
demo01.pp(86,1) Error: Error while linking
Closing script ppas.sh
bash-2.05b$

The SDL libs are installed in /usr/local/lib/ and the includes in
/usr/local/include/SDL.
I know, this is not a normal SDL problem, because Im using the bindings, but I think there is something wrong with the libraries. First, Ive installed the SDL package from the BSD
portcollection, but it was not the version that fits to the bindings.

That`s it. I hope you can help me.
Greetings Karim–
Karim
@Karim


http://www.fastmail.fm - Send your email first class

Karim wrote:

I installed SDL (1.2) from source and the fpc (FreePASCAL) bindings for
SDL on my FreeBSD 5.1 system.
When I try to compile a minimal sdl source code, I get this hugh list of
undefined references.

/usr/X11R6/lib//libX11.so.6: undefined reference to strpbrk' /usr/X11R6/lib//libX11.so.6: undefined reference to___tolower’
/usr/local/lib//libSDL.so: undefined reference to free' /usr/X11R6/lib//libX11.so.6: undefined reference togetsockname’
demo01.pp(86,1) Error: Error while linking

How do you invoke the linker? That looks like ‘-lc’ is missing i.e.,
you have to link against libc.so or libc.a. You can identify the
missing library with nm e.g.:

nm -A {,/usr{,/X11R6,/local}}/lib/*.{a,so} | grep ’ T .*getsockname’

If you’re compiling a C program it’s usually linked against libc
automagically. Your Pascal compiler might not do that per default.–
Christian
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040115/69d1071d/attachment.pgp