[comp.unix.i386] Linking Problems with SCO-ODT

wengland@stephsf.stephsf.com (Bill England) (08/21/90)

In article <20423@saleven.oz> mykel@saleven.saleven.oz.au (Michael Landers) writes:
>
>
>groff, actually) I get problems with multiply defined symbols.  These occurs
>when there are two static members of different classes with the same name.
>I seem to remember I had some other problems with this system, but they
>temporarily escape me.
>
>At this stage I have more or less given up, but I would really like to compile
>groff.
>
>Thanks in advance.
>
>Mykel.


   I've similar problems when compiling and linking software.  For instance
   I can not get ld to properly link items that contain ingres functions 
   without getting multiple defines.  It's really frustrating.  I believe
   that it is somehow related to the way that cc runs through the libraries
   and the ability to compile non coff libs into programs.

   Just to give you an idea of how wierd it gets I compiled the public
   domain spreadsheet yesterday ("sc").  
   
   1)  cc ( the microsoft compiler ) can not grok the ctl(?) command. 
   
   2)  So I used rcc, which could not grok the microsoft pragmas or 
       'error' commands ( these were embeded in the curses.h 
       files, why, why, ...). 
   
   3)  After everything compiled under rcc, rcc could not link the 
       final program together, unresolved externals. 

   4)  So I switched back to cc for the final link and was off and 
       running.

   I believe that you may be having a similar problem with gcc.  I don't 
   know how to fix it and hope that somebody out there can shed some
   light on this.

 +--------
 |  Bill England
 |  Stephen Software Systems, Inc.,   Tacoma Wa.
 |  wengland@stephsf.com              +1 206 564 2122
 |
  * *      H -> He +24Mev
 * * * ... Oooo, we're having so much fun making itty bitty suns *
  * *

rfg@NCD.COM (Ron Guilmette) (08/23/90)

In article <348@stephsf.stephsf.com> wengland@stephsf.stephsf.com (Bill England) writes:
>In article <20423@saleven.oz> mykel@saleven.saleven.oz.au (Michael Landers) writes:
>>
>>
>>groff, actually) I get problems with multiply defined symbols...
...
>   I've similar problems when compiling and linking software.  For instance
>   I can not get ld to properly link items that contain ingres functions 
>   without getting multiple defines...

In case my prior message didn't make it out, let me say again that I believe
that this problem is rooted in ld++ (which gets installed as gcc-ld).
Unfortunately, I have not yet had sufficient time to isolate this problem
and to *prove* that the problem is being caused by ld++.  So this ought
still be be considered simply an informed conjecture at this point.

If this problem is really getting you down, you might try an experiment to
help isolate this problem.  Try linking the same set of .o files and libraries
with your native system linker.  You should be able to do this simply by
temporarily renaming your installed gcc-ld file to gcc-ld.save or something
and then using g++ to invoke the linker (as you normally would).  Use the
-v option so that you can see exactly which linker gets invoked.  If your
native linker gets invoked, and if the `multiply defined' errors go away
then we know that the bug is in ld++.  If you do this experiment, please
post the results here.
-- 

// Ron Guilmette  -  C++ Entomologist
// Internet: rfg@ncd.com      uucp: ...uunet!lupine!rfg
// Motto:  If it sticks, force it.  If it breaks, it needed replacing anyway.