home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / hp / 10306 < prev    next >
Encoding:
Internet Message Format  |  1992-09-11  |  2.6 KB

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