🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #984

CFLAGS directives get hardwired?

#984
From: & Garrett
Date: Fri, 11 Sep 1992 20:55
25 lines
1817 bytes
This is a general question about the compiler, CFLAGS and directories and  
not just about Sybase dblibrary, so don't stop reading.  I have an app  
that uses a lot of Sybase dblibrary calls.  In my Makefile.preamble I have  
this line:

CFLAGS = -I/usr/sybase/include -L/usr/sybase/lib

	When I build the project and run it on my machine, everything  
works fine.  We have some machines at another site, and their mounts are  
different so that their SYBASE directory is /Exports/usr/local/sybase  
instead of /usr/sybase.  When they run the app there, it doesn't work (an  
error message says dblibrary can't find one of the files it needs in that  
directory).  When I hack a soft link on one of those machines from  
/usr/sybase to /Exports/usr/local/sybase, everything works fine.
	I don't understand a lot about the compiler, but I can't see why,  
after it's successfully found these header files and libraries at compile  
time, it hardwires these paths into the executable so that it only looks  
in those directories at run time.  Why not depend on PATH?  Is it  
unreasonable of me to want to be able to run something on a machine that  
doesn't have a directory structure exactly the same as the one on which it  
was compiled?
	What can I do?  Thanks in advance for any insight or help.

Colin Garrett
NeXTMail: colin@delphi.bsd.uchicago.edu
Technical Details
Message-ID: <1992Sep11.205510.4655@midway.uchicago.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uchinews!news

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uchinews!news
From: colin@agincourt.bsd.uchicago.edu (& Garrett)
Subject: CFLAGS directives get hardwired?
Message-ID: <1992Sep11.205510.4655@midway.uchicago.edu>
Sender: news@uchinews.uchicago.edu (News System)
Organization: University of Chicago Computing Organizations
Date: Fri, 11 Sep 1992 20:55:10 GMT
Lines: 25