[Lazarus] Howto link to shared objects

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Howto link to shared objects

Rüdiger Ranft
Hi all,

how do I link against dynamic libraries in linux? Currently I rewrite
the linker script

INPUT(
-ldl
-lpthread
-lX11
-lgdk_pixbuf-2.0
-lgtk-x11-2.0
-lgdk-x11-2.0
-lgobject-2.0
-lglib-2.0
-lgthread-2.0
-lgmodule-2.0
-lpango-1.0
-latk-1.0
-lcairo
)

section by

INPUT(
-ldl
-lpthread
-lX11
/usr/lib/libgdk_pixbuf-2.0.so.0
/usr/lib/libgtk-x11-2.0.so.0
/usr/lib/libgdk-x11-2.0.so.0
/usr/lib/libgobject-2.0.so
/usr/lib/libglib-2.0.so
/usr/lib/libgthread-2.0.so
/usr/lib/libgmodule-2.0.so
/usr/lib/libpango-1.0.so.0
/usr/lib/libatk-1.0.so.0
/usr/lib/libcairo.so.2
)

which seems to work, but is a tedious work.

bye
Rudi


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

signature.asc (916 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Howto link to shared objects

leledumbo
Administrator
Do you mean the default linker script doesn't work? Those -lxxx would be linked against libxxx.so, so make sure you have them in PATH (usually /usr/lib). Just create .so symlinks to those .so.0s
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Howto link to shared objects

Rüdiger Ranft
leledumbo schrieb:
> Do you mean the default linker script doesn't work? Those -lxxx would be
> linked against libxxx.so, so make sure you have them in PATH (usually
> /usr/lib). Just create .so symlinks to those .so.0s


Ok, I'll try if a .so link farm helps to solve this problem this weekend.

Thanks
Rudi


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

signature.asc (916 bytes) Download Attachment