Using Motif on LInux

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

3 posts / 0 new
Last post
Using Motif on LInux

Submitted by lourosas on Fri, 03/04/2005 - 04:17. General Questions
This has probably been talked about already but help please. oops
I have RedHat Linux 8 and I am trying to write a simple Motif program (one that I found online). I follow the example and compile like this cc -o program program.c -lXm -lXt -lX11.

I get the following error message /usr/bin/ld cannot find -lXm.

I modified the path to find the libraries and the includes. I have included the -I and -L option in the code. What could be the problem and why won't it compile??

Thanks, Lou Rosas

kv2

lourosas wrote:
This has probably been talked about already but help please. :oops:
I have RedHat Linux 8 and I am trying to write a simple Motif program (one that I found online). I follow the example and compile like this: cc -o program program.c -lXm -lXt -lX11.
I get the following error message: /usr/bin/ld: cannot find -lXm.

I modified the path to find the libraries and the includes. I have included the -I and -L option in the code. What could be the problem and why won't it compile??

Thanks, Lou Rosas

Linker cant find motif library - check placement of libXm* on your system and feed location to cc. For example -
$find /usr/X11R6/ -name "libXm*"
...
/usr/X11R6/lib/libXm.so.3
...
cc -o program program.c -lXm -lXt -lX11 -L/usr/X11R6/lib

motif12345

try this cc -o program program.c -L/usr/X11R6/lib -L/usr/lib -lXm -lXt -lX11 -lpt