linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* More Makefile Questions...
@ 2000-10-23 19:22 Michael Norton
  2000-10-24  5:42 ` Michel Lanners
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Norton @ 2000-10-23 19:22 UTC (permalink / raw)
  To: linuxppc-dev


hi,

I am still have problems with my linker. When I compile I see the  following problem:

[mnorton@b9 console]#make
gcc     -I/usr/X11R6/include -I/usr/X11R6/include/GL     glConsole.o /usr/lib/libglut.so.3.7.0 -L/usr/X11R6/lib -L/usr/local/lib -lXext -lX11    -o      gameCon
/usr/bin/ld: cannot find -lXext
collect2: ld returned 1 exit status
make: *** [gameCon] Error 1

Apparently I am experiencing difficulty with my lib path. Here is my Makefile:

C = gcc
CFLAGS = -g
INCLUDE = -I/usr/X11R6/include -I/usr/X11R6/include/GL

GLUT = /usr/lib/libglut.so.3.7.0

LIBPATH = -L/usr/X11R6/lib -L/usr/local/lib

#LDLIBS = -lMesaGLU -lMesaGL -lm -lXmu -lX11 -lXext -lXi -lXt
LDLIBS = -lXext -lX11

PROG = gameCon
SRCS = glConsole.c
OBJS = $(SRCS:.c=.o)

$(PROG) : $(OBJS)
	$(CC)	$(INCLUDE)	 $(OBJS) $(GLUT) $(LIBPATH)	$(LDLIBS)	-o	$(PROG)

Now for my libraries, for instance -lXext:
[mnorton@b9 glheretic-1.1]#ls /usr/X11R6/lib/*ext*
/usr/X11R6/lib/libXext.so.6  /usr/X11R6/lib/libXext.so.6.3


I experienced similar problems trying to link Mesa libs:
[mnorton@b9 console]#make
gcc     -I/usr/X11R6/include -I/usr/X11R6/include/GL    glConsole.o /usr/lib/libglut.so.3.7.0 -L/usr/X11R6/lib -L/usr/local/lib    -lMesaGLU -lMesaGL -lm -lXmu -lX11 -lXext -lXi -lXt   -o   gameCon
/usr/bin/ld: cannot find -lMesaGLU
collect2: ld returned 1 exit status
make: *** [gameCon] Error 1

I do have these libraries installed for Mesa:
[mnorton@b9 lib]#ls /usr/lib/*GL*
/usr/lib/libGL.a     /usr/lib/libGL.so.1.2.030100  /usr/lib/libGLU.so.1
/usr/lib/libGL.so    /usr/lib/libGLU.a             /usr/lib/libGLU.so.1.2.030100
/usr/lib/libGL.so.1  /usr/lib/libGLU.so            /usr/lib/libMesaGLw.a


Any ideas?

thanks,

Mike


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: More Makefile Questions...
  2000-10-23 19:22 More Makefile Questions Michael Norton
@ 2000-10-24  5:42 ` Michel Lanners
  0 siblings, 0 replies; 2+ messages in thread
From: Michel Lanners @ 2000-10-24  5:42 UTC (permalink / raw)
  To: mnorton; +Cc: linuxppc-dev


On  23 Oct, this message from Michael Norton echoed through cyberspace:
> [mnorton@b9 console]#make
> gcc     -I/usr/X11R6/include -I/usr/X11R6/include/GL     glConsole.o /usr/lib/libglut.so.3.7.0 -L/usr/X11R6/lib -L/usr/local/lib -lXext -lX11    -o      gameCon
> /usr/bin/ld: cannot find -lXext
> collect2: ld returned 1 exit status
> make: *** [gameCon] Error 1
>
> Now for my libraries, for instance -lXext:
> [mnorton@b9 glheretic-1.1]#ls /usr/X11R6/lib/*ext*
> /usr/X11R6/lib/libXext.so.6  /usr/X11R6/lib/libXext.so.6.3

You're missing the static lib (libXext.a) and the libXext.so symlink.
Here is what I have:
[mlan@piglet ~]$ ll /usr/X11R6/lib/*ext*
-rw-r--r--   1 root root   92144 Jul 22 02:27 /usr/X11R6/lib/libXext.a
lrwxrwxrwx   1 root root      14 Jun  1 10:53 /usr/X11R6/lib/libXext.so -> libXext.so.6.4
lrwxrwxrwx   1 root root      14 Jun  1 10:53 /usr/X11R6/lib/libXext.so.6 -> libXext.so.6.4
-rwxr-xr-x   1 root root   69916 Jul 22 02:30 /usr/X11R6/lib/libXext.so.6.4

To recreate the missing link, make sure all directories where you have
libraries are listed in /etc/ld.so.conf, and then run ldconfig as root.
For the static lib, you'll have to reinstall X (the XFree86-devel RPM).

> I experienced similar problems trying to link Mesa libs:
> [mnorton@b9 console]#make
> gcc     -I/usr/X11R6/include -I/usr/X11R6/include/GL    glConsole.o /usr/lib/libglut.so.3.7.0 -L/usr/X11R6/lib -L/usr/local/lib    -lMesaGLU -lMesaGL -lm -lXmu -lX11 -lXext -lXi -lXt   -o   gameCon
> /usr/bin/ld: cannot find -lMesaGLU
> collect2: ld returned 1 exit status
> make: *** [gameCon] Error 1
>
> I do have these libraries installed for Mesa:
> [mnorton@b9 lib]#ls /usr/lib/*GL*
> /usr/lib/libGL.a     /usr/lib/libGL.so.1.2.030100  /usr/lib/libGLU.so.1
> /usr/lib/libGL.so    /usr/lib/libGLU.a             /usr/lib/libGLU.so.1.2.030100
> /usr/lib/libGL.so.1  /usr/lib/libGLU.so            /usr/lib/libMesaGLw.a

Something's fishy here too: you're telling ld to look for the MesaGLU
library, which will (according to the convention), be called
libMesaGLU.so (shared lib) or libMesaGLU.a (static library). Both are
missing. The same is true for -lMesaGL: neither static nor shared is
present. I suppose (but I could be wrong) that your program should be
looking for libGL and libGLU.


Michel

-------------------------------------------------------------------------
Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   mlan@cpu.lu            |
http://www.cpu.lu/~mlan        |                     Learn Always. "


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-10-24  5:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-10-23 19:22 More Makefile Questions Michael Norton
2000-10-24  5:42 ` Michel Lanners

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).