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

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!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.182156.16470@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>
  9. Date: Wed, 30 Dec 1992 18:21:56 GMT
  10. Lines: 40
  11.  
  12. Since several people have suggested a problem with specifying the
  13. library, let me make it clear that this is _not_ the cause.
  14.  
  15. % cc -o pgm pgm.o sagebrush.a
  16.  
  17. causes the error
  18.  
  19.   TupleFile::find ([4 lines of parameters deleted]) not found
  20.  
  21. However, if we extract the object file containing TupleFile::find()
  22. from the library and attempt to link:
  23.  
  24. % ar r sagebrush.a tuple.o
  25. % cc -o pgm pgm.o sagebrush.a tuple.o
  26.  
  27. the "TupleFile::find () not found" error message goes away, although
  28. we now get a large number of "multiply defined" errors.  
  29.  
  30. (The object file must follow the library since the object file is
  31. pretty deep in the call tree of the RDBMS).
  32.  
  33. The fact that the link works with an object file but not with the
  34. same object file embedded in a library is what worries us.  We could
  35. make a workaround, but what else will break?  (BTW, I can link without
  36. problems, but my coworker can't even though we are using the same
  37. NSF-mounted compiler!)
  38.  
  39. FYI, The exact form of TupleFile::find() provided by nm++ is:
  40.  
  41. 00002794 T   TupleFile::find(int(*)(unsigned const char* const,unsigned const
  42.         char* const),unsigned const char* const,long&,DBStatus(*)
  43.         (unsigned const char* const,unsigned const char* const,const
  44.         long,const long,unsigned char*),unsigned char*)
  45.              [_find__9TupleFileFPFCPCUcT1_iCPCUcRlPFCPCUcT1ClT3PUc_8DBStatusPUc]
  46.  
  47.          (Note the mangled name!)
  48.  
  49.  
  50. Bear Giles
  51. bear@fsl.noaa.gov
  52.