Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jun 1999 20:46:38 -0400
From:      Brandon Fosdick <bfoz@glue.umd.edu>
To:        Nathan Ahlstrom <nrahlstr@winternet.com>
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Linking libraries on 3.2-S
Message-ID:  <376996EE.887EADCB@glue.umd.edu>
References:  <37697EC6.4FA99E8@glue.umd.edu> <19990617183928.A44151@portage.winternet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Nathan Ahlstrom wrote:
> 
> 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

That did the trick, thanks. Shouldn't it be looking in that directory by
default? rc.conf has it listed in the directories scanned at boot.

The -v option prints out the commands it used in the compilation. It
puts out enough to show that it's only looking in /usr/lib. 

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?376996EE.887EADCB>