Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jun 1999 19:03:34 -0400
From:      Brandon Fosdick <bfoz@glue.umd.edu>
To:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Linking libraries on 3.2-S
Message-ID:  <37697EC6.4FA99E8@glue.umd.edu>

next in thread | raw e-mail | index | archive | help

When compiling/linking my own programs I can't seem to link to any
library past the 50th entry in ld hints file. I discovered this while
trying to write an OpenGL program. I can however make ports that rely on
X libs, which are all above the 50th entry. This seems very wierd to me.
I've already tried reinstalling XFree using sysinstall. Let me know if
any more info would help...

Here's the Makefile I'm using:
# Makefile for myprog

SHELL = /bin/sh
PATH = .:/bin:/usr/bin/:usr/local
CC = cc
INCLUDE_DIRS = -I/usr/include -I/usr/X11R6/include
CFLAGS = $(INCLUDE_DIRS) 
LDFLAGS = -lm -lGL
MAKE = make

.c:
        $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
-----
and the error I get:
128 16:48~/devel/myprog>make myprog
cc -I/usr/include -I/usr/X11R6/include -lGL myprog.c -o myprog
/usr/libexec/elf/ld: cannot open -lGL: No such file or directory
*** Error code 1

Stop.
------
libGL is known to ld. Snipped output from 'ldconfig -r':
88:-lMesaGL.14 => /usr/X11R6/lib/libMesaGL.so.14
89:-lMesaGLU.14 => /usr/X11R6/lib/libMesaGLU.so.14
90:-lglut.3 => /usr/X11R6/lib/libglut.so.3
91:-lGL.14 => /usr/X11R6/lib/libGL.so.14
92:-lGLU.14 => /usr/X11R6/lib/libGLU.so.14

Thanks,
Brandon
-- 
bfoz@glue.umd.edu
"Lead, follow, or get run over"
"In life there are those who steer, and those who push"
"I'm not impatient, the world is too slow"
"Life is short, so have fun, play hard, and leave a good looking corpse"


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37697EC6.4FA99E8>