"cannot find -lXm" why?
It's my first program in GCC with X Windows.
I compiled my code with this:
gcc HelloWorld.c -o HelloWorld -lXm -lXt -lX11
same as the original poster used.
I got the same error.
/usr/bin/ld: cannot find -lXm
collect2: ld returned 1 exit status
So I compiled it with the path from:
locate libXdm
which is:
/usr/X11R6/lib/libXdmcp.a
So I compiled the code with:
gcc HelloWorld.c -o HelloWorld -l/usr/X11R6/lib/libXdmcp.a -lXm -lXt -lX11
but the same error occured:
/usr/bin/ld: cannot find -l/usr/X11R6/lib/libXdmcp.a
collect2: ld returned 1 exit status
Then I saw some codes in the net and how to compile them so:
gcc HelloWorld.c -o HelloWorld -L/usr/X11R6/lib/libXdmcp.a -lXm -lXt -lX11
But then it goes back to:
/usr/bin/ld: cannot find -lXm
collect2: ld returned 1 exit status
What am I doing wrong? I'm using Fedora Core 3. I searched for the Xm, Xt and X11 folder in my computer using whereis. I did get the paths except for Xt but when I compile the problem started with Xm not Xt. The Xm and X11 folders do contain some files.
Please help.
*Cheers
Last edited by johnhardey; 02-16-2005 at 08:01 PM.
|