This is the mail archive of the cygwin 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]
Other format: [Raw text]

linking with static .lib


Hi,
   I have a windows static .lib that I want to use in a cygwin program.
   Now, since 
the .lib requires the microsoft c-runtime, I cant directly link it into
my cygwin program. So I thought I'd make a dll out of it that is linked
with the microsoft
c-runtime and then link with the import lib of that dll.
   So I did this to try and create the dll:
%gcc -mno-cygwin -shared -o mydll.dll -Wl,--export-all-symbols
-Wl,--whole-archive windows_static.lib Wl,--no-whole-archive

But im getting these errors:
fu000001.o(.idata$3+0xc): undefined reference to `_libmsvcrt_a_iname'
fu000002.o(.idata$3+0xc): undefined reference to `_libmsvcrt_a_iname'
fu000003.o(.idata$3+0xc): undefined reference to `_libmsvcrt_a_iname'
fu000004.o(.idata$3+0xc): undefined reference to `_libmsvcrt_a_iname'
fu000005.o(.idata$3+0xc): undefined reference to `_libmsvcrt_a_iname'
fu000006.o(.idata$3+0xc): more undefined references to
`_libmsvcrt_a_iname' follow
nmth000000.o(.idata$4+0x0): undefined reference to `__nm___pctype'
nmth000014.o(.idata$4+0x0): undefined reference to `__nm____mb_cur_max'
nmth000028.o(.idata$4+0x0): undefined reference to `__nm___iob'

And these warnings:
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized
.
.
many more of these.



First of all, am I going down the right path in linking to the lib? And
if so, what am
I doing wrong.

Thanks,
--Vikram

-- 
  Vikram Shrowty
  vikramshrowty@fastmail.fm

-- 
http://www.fastmail.fm - And now for something completely different?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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