Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-03

Howto link to shared objects

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 898 bytes
Desc: OpenPGP digital signature
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110330/9265b97e/attachment.bin>

Reply by email

Rüdiger Ranft
to leledumbo
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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 898 bytes
Desc: OpenPGP digital signature
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110401/3b82eaf6/attachment.bin>

Reply by email