home *** CD-ROM | disk | FTP | other *** search
- From: mjs@hpfcso.FC.HP.COM (Marc Sabatella)
- Date: Fri, 11 Sep 1992 20:28:03 GMT
- Subject: Re: HP-UX compiler options
- Message-ID: <7371304@hpfcso.FC.HP.COM>
- Organization: Hewlett-Packard, Fort Collins, CO, USA
- Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!scd.hp.com!cupnews0.cup.hp.com!hppad.waterloo.hp.com!hppad!hpfcso!mjs
- Newsgroups: comp.sys.hp
- References: <1992Sep9.225019.2498@zip.eecs.umich.edu>
- Lines: 54
-
- In comp.sys.hp, cyc@z.eecs.umich.edu (Yi-Chieh Chang) writes:
-
- > Recently, I tried to install 'flea' program on my HP720 machine to convert
- > magic layout to varies printer files. Since 'flea' was written for Sun OS,
- > there is one compiler option didn't work on HP720. Can any one give me some
- > help. THe option is '-lc' to load libraries routines to 'cc'. When I
- > include this option, the compiler said that lots of system routines cannot
- > be found. If I remove this option, it compiles
-
- I'm not sure why "-lc" was being explicitly added to "cc" option list in the
- SunOS makefile; Sun's C compiler, like HP's, automatically knows to search the
- system libraries. Most likely the option was not needed on SunOS, either.
-
- I can make a guess as to why adding the option to the HP "cc" command line
- produced problems - the 700 linker probably knows not to search a shared
- library twice, so it searched the library only when you told it to, and not
- at the end where it normally does by default. That is, normally a command like
-
- cc *.o
-
- gets translated into
-
- ld ... *.o ... -lc
-
- so the library is searched *after* the .o's. You probably did something like
-
- cc -lc *.o
-
- which got translated into
-
- ld ... -lc *.o ... -lc
-
- and the linker then ignored the second "-lc"; unfortunately, it didn't get
- everything it needed out of the library because you searched it before any
- .o's. This is my best guess given the information you've given me so far.
- Actually, it seems unlikely to me that the 700 linker would have complained
- about the unresolved symbols even in this case, so I may be off base. Please
- post the full command lines you tried, and the exact text of the error messages
- you got.
-
- > but the executable code
- > doesn't work completely. It did convert magic layout to Postcript files but
- > the laser printer only prints blank page.
-
- I still suspect that removing "-lc" was the right thing to do. If the code
- doesn't seem to work right, you probably need to look elsewhere - perhaps it
- is not configured correctly for the printer you are using (most HP laser
- printers do not speak Postscript by default).
-
- --------------
- Marc Sabatella (marc@hpmonk.fc.hp.com)
- Disclaimers:
- 2 + 2 = 3, for suitably small values of 2
- Bill (H.) and Dave (P.) may not always agree with me
-