home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / cplus / 18575 < prev    next >
Encoding:
Text File  |  1992-12-30  |  1.5 KB  |  35 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!munnari.oz.au!spool.mu.edu!agate!dog.ee.lbl.gov!hellgate.utah.edu!csn!qwerty-gw.fsl.noaa.gov!kestrel.fsl.noaa.gov!bear
  3. From: bear@kestrel.fsl.noaa.gov (Bear Giles)
  4. Subject: Re: Weird problem under Sun/C++
  5. Message-ID: <1992Dec30.235830.9504@fsl.noaa.gov>
  6. Sender: news@fsl.noaa.gov (USENET News System)
  7. Organization: Forecast Systems Labs, NOAA, Boulder, CO USA
  8. References: <1992Dec30.003304.4131@fsl.noaa.gov> <1992Dec30.182156.16470@fsl.noaa.gov>
  9. Date: Wed, 30 Dec 1992 23:58:30 GMT
  10. Lines: 23
  11.  
  12. We finally found the problem.
  13.  
  14. She was specifying the library with -lsage, thinking that the linker would
  15. use the copy of libsage.a in her current directory.
  16.  
  17. Instead if was using an old copy in ~/lib which she had forgotten about.
  18. The procedure TupleFile::find() had recently changed (the fifth argument
  19. of the fourth argument (which was a pointer to a function) had just dropped
  20. a 'const' keyword).
  21.  
  22. Therefore, her source and the _local_ library had matching member functions.
  23. Extracting the object file from the local library worked (although it caused
  24. 'multiply defined' error messages), but replacing the file in the local
  25. library didn't solve any problems.
  26.  
  27. We only found the problem after replacing -lsage with libsage.a -- which
  28. suddenly worked!  After switching back to -lsage and digging in the CC
  29. man page we found the linker flag which causes it to display the actual
  30. libraries used and discovered the old copy of the library.
  31.  
  32.  
  33. Bear Giles
  34. bear@fsl.noaa.gov
  35.