tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Solved: Having trouble dynamically linking X11.c



Hi Edgar.

Thanks for that link I can now get the programmes to compile with

gcc programme.c -I /usr/X11R7/include -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -lX11 -oprogramme


Regards Ahi
On Friday, 7 August 2020, 22:51:52 GMT+12, <edgar%pettijohn-web.com@localhost> wrote:


https://www.netbsd.org/docs/elf.html#elf-rpath

On Aug 7, 2020 4:12 AM, Ahi Brown <ahibrown%yahoo.co.uk@localhost> wrote:

Hi.

I'm having trouble trying to compile a basic example x11.c program from https://rosettacode.org/wiki/Window_creation/X11#Xlib on amd-64 NetBSD 9.0

I'm using:
gcc rosex.c -I /usr/X11R7/include -L /usr/X11R7/lib -lX11

when I do

ldd a.out
-lX11.7 => not found
-lc.12 => /usr/lib/libc.so.12

when I do
ldd /usr/X11R7/bin/oclock
-lX11.7 => /usr/X11R7/lib/libX11.so.7

all the oclock X11 libs are linked to /usr/X11R7/lib

Regards

Ahi




Home | Main Index | Thread Index | Old Index