From owner-freebsd-questions Thu Jun 17 16:36:40 1999 Delivered-To: freebsd-questions@freebsd.org Received: from icicle.winternet.com (icicle.winternet.com [198.174.169.13]) by hub.freebsd.org (Postfix) with ESMTP id 979C114CCD for ; Thu, 17 Jun 1999 16:36:17 -0700 (PDT) (envelope-from nrahlstr@winternet.com) Received: from portage.winternet.com (ppp-67-193.dialup.winternet.com [204.246.67.193]) by icicle.winternet.com (8.9.3/8.9.3) with ESMTP id SAA13861; Thu, 17 Jun 1999 18:36:14 -0500 (CDT) SMTP "HELO" (ESMTP) greeting from portage.winternet.com But _really_ from :: ppp-67-193.dialup.winternet.com [204.246.67.193] SMTP "MAIL From" = nrahlstr@winternet.com (Nathan Ahlstrom) SMTP "RCPT To" = Received: (from nrahlstr@localhost) by portage.winternet.com (8.9.3/8.9.2) id SAA66213; Thu, 17 Jun 1999 18:39:29 -0500 (CDT) (envelope-from nrahlstr) Date: Thu, 17 Jun 1999 18:39:28 -0500 From: Nathan Ahlstrom To: Brandon Fosdick Cc: FreeBSD Questions Subject: Re: Linking libraries on 3.2-S Message-ID: <19990617183928.A44151@portage.winternet.com> References: <37697EC6.4FA99E8@glue.umd.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i In-Reply-To: <37697EC6.4FA99E8@glue.umd.edu>; from Brandon Fosdick on Thu, Jun 17, 1999 at 07:03:34PM -0400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Brandon Fosdick wrote: > > 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 Just to see if this works, try adding -L/usr/X11R6/lib to the LDFLAGS line in the makefile. Adding the -v option to cc might tell you where it is looking for libraries? (not too sure about this one) Good Luck, Nathan > 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 -- Nathan Ahlstrom FreeBSD: http://www.FreeBSD.org/ nrahlstr@winternet.com PGP Key ID: 0x67BC9D19 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message