LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 04-14-2002, 02:48 PM   #1
jwblair
LQ Newbie
 
Registered: Apr 2002
Posts: 1

Rep: Reputation: 0
Angry Can't get MOTIF to compile with my libraries...


Hello, I am using Red Hat 7.2 and I am trying to write a X/Motif hello world program. I just cant get the program to compile. The source code is correct because I am using an example off the web. However, I can't get it to link to the correct libraries. It can't find the header files that it needs. Please take a look below at my path:

[root@localhost chapter-2]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
[root@localhost chapter-2]#

This is what happens when I compile the program:

[root@localhost chapter-2]# make hello
cc hello.c -o hello
hello.c:5:22: Xm/PushB.h: No such file or directory
make: *** [hello] Error 1
[root@localhost chapter-2]#

The library files for X/Motif are located here and are as follows:
[root@localhost include]# pwd
/usr/X11R6/include
[root@localhost include]# ls -als
total 40
4 drwxr-xr-x 6 root root 4096 Apr 6 05:11 .
4 drwxr-xr-x 8 root root 4096 Apr 6 04:44 ..
4 drwxr-xr-x 2 root root 4096 Apr 6 05:11 DPS
0 lrwxrwxrwx 1 root root 30 Apr 6 05:11 Dt -> ../LessTif/Motif2.1/include/Dt
0 lrwxrwxrwx 1 root root 31 Apr 6 05:11 Mrm -> ../LessTif/Motif1.2/include/Mrm
0 lrwxrwxrwx 1 root root 31 Apr 6 05:11 uil -> ../LessTif/Motif1.2/include/uil
4 drwxr-xr-x 14 root root 4096 Apr 6 05:11 X11
0 lrwxrwxrwx 1 root root 9 Apr 6 05:11 Xaw3d -> X11/Xaw3d
4 drwxr-xr-x 2 root root 4096 Apr 6 05:11 Xbae
4 -r--r--r-- 1 root root 2934 Sep 5 2001 xf86Optrec.h
12 -r--r--r-- 1 root root 10310 Sep 5 2001 xf86Parser.h
4 drwxr-xr-x 2 root root 4096 Apr 6 05:11 Xlt
0 lrwxrwxrwx 1 root root 30 Apr 6 05:11 Xm -> ../LessTif/Motif1.2/include/Xm
[root@localhost include]#

Here are my makefiles:
[root@localhost chapter-2]# more Imakefile Makefile.raw
::::::::::::::
Imakefile
::::::::::::::
SYS_LIBRARIES = -lXm -lXt -lSM -lICE -lX11

AllTarget(hello)

NormalProgramTarget(hello,hello.o,,,)
::::::::::::::
Makefile.raw
::::::::::::::
PROGRAMS = hello

CFLAGS=
INCLUDES = -I/usr/Motif21/include -I/usr/X11R6/include
LIBS= -L/usr/Motif21/lib -L/usr/X11R6/lib -lXm -lXt -lSM -lICE -lX11

all: $(PROGRAMS)

.c: ; $(CC) $(CFLAGS) $(INCLUDES) $@.c $(LIBS) -o $@

clean::
-rm -f $(PROGRAMS) *.o

[root@localhost chapter-2]#

So what am I doing wrong? Please, anything would help...

Thanks!

-Bill
 
Old 04-16-2002, 07:18 AM   #2
Eternal
Member
 
Registered: Feb 2002
Location: Austria
Distribution: LFS based opon debian or course
Posts: 38

Rep: Reputation: 15
From /usr/X11R6/include do :

file ../LessTif/Motif2.1/include/Dt etc...

because i doubt you have a /usr/X11R6/LessTiff
But most probly a /usr/X11R6/(lib|include)/LessTiff

but to be frack, im getting used to reply to question that i dont know the answer maybe read the README for the LessTiff version needed.
 
Old 04-28-2002, 07:35 PM   #3
Hano
Member
 
Registered: Sep 2001
Location: Venezuela, Caracas
Distribution: RedHat 9.0
Posts: 196

Rep: Reputation: 30
if still getting problems uninstall Lesstif libraries and try OpenMotif 2.2



Hano
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compile libraries within alaios Programming 1 07-14-2005 04:11 AM
Missing libraries to compile and to start mozilla (very basic libs) Necronomicom Slackware 3 07-30-2004 04:50 AM
Motif hiteshmaisheri Linux - Software 1 01-10-2004 06:31 AM
What compilers/ libraries ect do I need installed so that I can compile most software jimdaworm Linux - Newbie 2 09-12-2003 04:45 PM
Motif mikeshn Linux - Newbie 5 03-03-2002 01:10 PM


All times are GMT -5. The time now is 08:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration