Header files References (linux)

I am attempting to compile some simple applications, such as creating a label etc, but I am consistently receiving the following error, when I am including these header files in my code.

#include
#include

--------Error----------
>gcc -I/usr/X11R6/include -o label label.c -lXm -lXt -lX11
/usr/bin/ld cannot find -lXm
collect2 ld returned 1 exit status

---------End--------------

I also tried to create symbolic links to the directories such as "Xm" etc in /usr/include, but with no luck.

Any ideas would be greatly appreciated.


Mark

Mark's picture

Header files References (linux)

Actually the error you`re seeing is that it didn`t find the Motif library. There were no errors finding the header files. You need to have both the -I and the -L flags in order to build. From your example, you want

gcc -I/usr/X11R6/include -L/usr/X11R6/lib -lXm -lXt -lXp -lX11 -o label label.c