delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/02/11/21:32:00

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
MIME-Version: 1.0
From: "Vikram Shrowty" <vikramshrowty AT fastmail DOT fm>
To: cygwin AT cygwin DOT com
Date: Wed, 11 Feb 2004 18:27:38 -0800
Message-Id: <1076552858.4570.180903314@webmail.messagingengine.com>
Subject: linking with static .lib
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i1C2Vud4011760

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 AT fastmail DOT 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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019