home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / next / programm / 6125 < prev    next >
Encoding:
Text File  |  1992-09-11  |  1.7 KB  |  36 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uchinews!news
  3. From: colin@agincourt.bsd.uchicago.edu (& Garrett)
  4. Subject: CFLAGS directives get hardwired?
  5. Message-ID: <1992Sep11.205510.4655@midway.uchicago.edu>
  6. Sender: news@uchinews.uchicago.edu (News System)
  7. Organization: University of Chicago Computing Organizations
  8. Date: Fri, 11 Sep 1992 20:55:10 GMT
  9. Lines: 25
  10.  
  11. This is a general question about the compiler, CFLAGS and directories and  
  12. not just about Sybase dblibrary, so don't stop reading.  I have an app  
  13. that uses a lot of Sybase dblibrary calls.  In my Makefile.preamble I have  
  14. this line:
  15.  
  16. CFLAGS = -I/usr/sybase/include -L/usr/sybase/lib
  17.  
  18.     When I build the project and run it on my machine, everything  
  19. works fine.  We have some machines at another site, and their mounts are  
  20. different so that their SYBASE directory is /Exports/usr/local/sybase  
  21. instead of /usr/sybase.  When they run the app there, it doesn't work (an  
  22. error message says dblibrary can't find one of the files it needs in that  
  23. directory).  When I hack a soft link on one of those machines from  
  24. /usr/sybase to /Exports/usr/local/sybase, everything works fine.
  25.     I don't understand a lot about the compiler, but I can't see why,  
  26. after it's successfully found these header files and libraries at compile  
  27. time, it hardwires these paths into the executable so that it only looks  
  28. in those directories at run time.  Why not depend on PATH?  Is it  
  29. unreasonable of me to want to be able to run something on a machine that  
  30. doesn't have a directory structure exactly the same as the one on which it  
  31. was compiled?
  32.     What can I do?  Thanks in advance for any insight or help.
  33.  
  34. Colin Garrett
  35. NeXTMail: colin@delphi.bsd.uchicago.edu
  36.