Xref: utzoo comp.sys.hp:3467 comp.lang.pascal:2694 Path: utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!ucsd!usc!brutus.cs.uiuc.edu!uakari.primate.wisc.edu!aplcen!haven!uvaarpa!mcnc!rti!bnrunix!rick From: rick@bnrunix.UUCP (Rick Johns) Newsgroups: comp.sys.hp,comp.lang.pascal Subject: Separate Compilation With HP/UX Pascal Keywords: HP/UX, Pascal Message-ID: <416@bnrunix.UUCP> Date: 17 Nov 89 23:12:20 GMT Organization: BNR Inc., RTP, NC Lines: 42 Hi. I'm having trouble understanding something, or maybe it's just trouble believing something. When compiling a Pascal module that IMPORTs another module, it's necessary to use a $SEARCH$ compiler directive to tell the compiler exactly where to find the object code for the IMPORTed module. So, if module X IMPORTs module Y, the $SEARCH$ directive in X might be: $SEARCH 'Y.o'$ However, if I want to keep IMPORTed files in a central library someplace but still be able to compile Y locally (on occasion), I need something like: $SEARCH 'Y.o', '/stuff/Ylib.a'$ Now, though, the compiler still insists on finding Y.o, even though it might not be around. Y is still in Ylib.a, so what's the problem? I can think of a number of kludges to get around this, but they're all real ugly. Anyone have a graceful solution? While I'm on it, what is the advantage to this? Why can't I just specify on the command line what libraries and object files to link in? I saw something about guaranteeing that modules don't use each other (Y has to be compiled already when X is compiled, so Y can't use X) but it's hard to believe that this is the only way to do it. The source code should not contain pathnames of object files. It's ludicrous. Thanks in advance-- Rick Johns BNR Research Triangle Park, NC (919)991-7191 rti!bnrunix!rick@mcnc.org uunet!mcnc.org!bnrunix!rick@uunet.UU.NET rjohns@bnr.ca ================================================================================ The word is "its". "It's" is something else entirely. ================================================================================ Disclaimer: These opinions are mine and not BNR's.