This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

static link with .lib files


Hi!
    I am a newbie to this list so if this has been covered before
I apologize (although I did search the archives before asking this).

I am trying to link two third party packages together, one a C++/egcs
based package, with a MSVC generated static library.  If I link with ld,

I get the "ignoring duplicate sections of '.text'" error message and the

call address of all the calls to the MSVC objects are lost
(disassembled:
call 0x0) in the resultant executable. (Note I extracted all the
relevant objects from the .lib and linked against the .obj files.)  Is
there some
way to make these .obj usable by ld?

Alternatively, if I link with link.exe, I get collisions with
libstdc++.a in any
module that uses streams.  Here is a sampling of the error messages:

libstdc++.a(iostream.o) : error LNK2005: ___ls__7ostreamb already
defined in bbeNet.o
libstdc++.a(streambuf.o) : error LNK2005: __vt$3ios already defined in
bbeModScan.o

I am also getting some undefines in libcygwin.a -- I get about 14
unresolved, here are a couple:

libcygwin.a(libccrt0.o) : error LNK2001: unresolved external symbol
_GetModuleHandleA@4
libcygwin.a(libccrt0.o) : error LNK2001: unresolved external symbol
__data_start__

Where do I pick up these symbols?  In general, what do I need to link
with  when I use
the MS link.exe and want to pick egcs/cygwin objects?

Thanks for the help,

Karl

a



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]