Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Disposition: inline Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 From: "Vikram Shrowty" 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 Content-Transfer-Encoding: 8bit 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/