Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jun 1999 18:39:28 -0500
From:      Nathan Ahlstrom <nrahlstr@winternet.com>
To:        Brandon Fosdick <bfoz@glue.umd.edu>
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Linking libraries on 3.2-S
Message-ID:  <19990617183928.A44151@portage.winternet.com>
In-Reply-To: <37697EC6.4FA99E8@glue.umd.edu>; from Brandon Fosdick on Thu, Jun 17, 1999 at 07:03:34PM -0400
References:  <37697EC6.4FA99E8@glue.umd.edu>

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

Brandon Fosdick <bfoz@glue.umd.edu> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990617183928.A44151>