[fpc-pascal]Linker error with OpenGL and SDL

Marco van de Voort marcov at stack.nl
Sun Oct 26 22:51:59 CET 2003

[ Charset ISO-8859-1 unsupported, converting... ]
> Hello
> I installed the SDL Bindings for FPC (FreeBSD). I compiled the bindings
> and copied
> the all .ppu and object files in a SDL units directory.
> Now, I want to test sdl and the bindings with the examples the comes with
> the it. Like demo01.pp
> When I try to compile it, I get this message:
> x1-6-00-a0-24-7e-45-37# fpc demo01.pp
> Free Pascal Compiler version 1.0.10 [2003/06/27] for i386
> Copyright (c) 1993-2003 by Florian Klaempfl
> Target OS: FreeBSD/ELF for i386
> Compiling demo01.pp
> Assembling demo01
> Linking demo01
> /usr/bin/ld: cannot find -lSDL
> demo01.pp(87) Error: Error while linking
> Closing script ppas.sh
> All my SDL libaries are installed in /usr/local/lib. I`ve also adapted
> the fpc.cfg file.

- If you have a {$linklib SDL} in your demo, make sure it is lowercase.
- Try to compile again, and if it fails, check if there is a
	SEARCH_DIR(/usr/local/lib) in the link.res file.

There is a problem with 1.0.10 OpenGL, but IIRC that was a missing "libdl"

A fix for that is at http:/www.stack.nl/~marcov/openglfreebsd.tar.gz

More information about the fpc-pascal mailing list