Re: linking issue - what am I doing wrong?

2016-03-25 Thread Swift Griggs
Some folks, who have had similar issues, asked what I ended up doing and if I'd post it. Here's the skinny: I was doing this: gcc -g -Wall -I/usr/pkg/include -I/usr/X11R7/include -lXm \ -L/usr/pkg/lib -o hello hello.c I switched it to this: gcc -Wl,-rpath,/usr/pkg/lib

Re: linking issue - what am I doing wrong?

2016-03-25 Thread Gerard Lally
On Fri, 25 Mar 2016 15:50:36 -0600 (MDT) Swift Griggs wrote: > > Some folks, who have had similar issues, asked what I ended up doing and if > I'd post it. Here's the skinny: > > I was doing this: > > gcc -g -Wall -I/usr/pkg/include -I/usr/X11R7/include -lXm \ >

Re: linking issue - what am I doing wrong?

2016-03-25 Thread Swift Griggs
On Fri, 25 Mar 2016, Rhialto wrote: It looks like you need to give the runtime library path to the linker. See ld's -rpath option. Yep. J. Hannken-Illjes sent me a note about the same issue and I was able to make it work. Unfortunately different compilers have slightly different ways of

Re: linking issue - what am I doing wrong?

2016-03-25 Thread Rhialto
On Fri 25 Mar 2016 at 14:53:20 -0600, Swift Griggs wrote: > Any ideas? It looks like you need to give the runtime library path to the linker. See ld's -rpath option. Unfortunately different compilers have slightly different ways of specifying this (and passing it on to the linker). I think

linking issue - what am I doing wrong?

2016-03-25 Thread Swift Griggs
I'm doing some tutorials on Motif. I'm really just getting started. I'm doing something ignorant while linking and I'm not sure what it is. What happens is that I'm able to get Motif and Xtoolkit linked to my little test program, but the program won't run unless LD_LIBRARY_PATH is set. Yet