[fpc-pascal] Re: Link libglx library.

Michalis Kamburelis michalis.kambi at gmail.com
Thu May 14 15:51:47 CEST 2009


Guillermo Martínez Jiménez wrote:
> Jonas Maebe wrote:
>> -klglx (note the extra "l").
> 
> I tried that:
> 
> fpc -02 -Sh -FUlib/ -klglx /exbasic.pp -oexbasic
> 
> But it returns that error:
> 
> /usr/bin/ld: lglx: No such file: No such file or directory
> 
> I look for a dev package for GLX (libgl1-mesa-glx-dev?) but I can't
> find it. Which packages should I install on Ubuntu?
> 

Because it should be -k-lglx (additional "-" inside). "-k" tells FPC to
pass "-lglx" to the linker, and "-lglx" tells the linker to link with
libglx.so.

But honestly, I think that you're running blind here. You should never
link explicitly to libglx.so anyway, on Ubuntu you have libglx.so inside
/usr/lib/xorg/modules/extensions --- which is not something that an
ordinary program should link with. Your program should not need to link
explicitly with any glx library. At least with FPC's glx.pp, the library
is loaded dynamically, and actually (under normal Linux, not Mac OS X
Darwin) glX functions are loaded straight from libGL.so. Note also your
error message:

./exbasic: symbol lookup error: /usr/local/lib/libagl.so: undefined
symbol: glXQueryExtension

This says something strange, the linker for some reason is looking for
glXQueryExtension inside libagl.so. What exactly is
/usr/local/lib/libagl.so? (It couldn't come from Ubuntu packages.) How
(and why) are you linking with glX?

Michalis



More information about the fpc-pascal mailing list