MOTIF compiling error / X11/intrinsic.h missing

22.8k Views Asked by At

i have MOTIF installed X11
a easy program is saved as hello.c
there is the following message
where can i get the X11/intrinsic.h , file ???
need help to compile
my system : MX-16 Linux Debian Jessie / i386

Code:

hans@mx1:~/Documents
$ cc push.c -o push -lXm -lXt -lX11
In file included from push.c:2:0:
/usr/include/Xm/Xm.h:59:27: fatal error: X11/Intrinsic.h: No such file or directory
 #include <X11/Intrinsic.h>
                           ^
compilation terminated.
hans@mx1:~/Documents
2

There are 2 best solutions below

0
On

The copy on my system came from libxt-dev

$ locate Intrinsic
/usr/include/X11/Intrinsic.h
/usr/include/X11/IntrinsicI.h
/usr/include/X11/IntrinsicP.h

$ dpkg-query -S /usr/include/X11/Intrinsic.h 
libxt-dev:amd64: /usr/include/X11/Intrinsic.h

You may want to install and use apt-file - you can ask it for a filename and it will tell you which packages (that you don't even have to have installed - just from the repos in your sources.lists) contain a file with that name

1
On

I installed the libxt-dev package on my Debian box:

apt-get install libxt-dev

Then the proper header will be installed:

# find /usr -name "Intrinsic.h" -print
/usr/include/X11/Intrinsic.h

Been using xv for several decades now -- I always find myself trying to rebuild it.