delorie.com/archives/browse.cgi | search |
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 |
Message-ID: | <888E9ABB4271D311B3B20008C7B3C8FC393A77@pecasm02.pecoma.nl> |
From: | Wiebe de Vries <w DOT devries AT pecoma DOT nl> |
To: | "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com> |
Subject: | Shared libraries. |
Date: | Mon, 25 Mar 2002 16:12:28 +0100 |
MIME-Version: | 1.0 |
X-Mailer: | Internet Mail Service (5.5.2653.19) |
Hello, I'm trying to build and use shared libraries with Cygwin under Windows 2000. The first step, i.e. building the library, succeeds. I get a libmylib.so (together with libmylib.so.1 and limmylib.so.1.0.0). However, linking is a problem. I've written a small program which uses libmylib.so and try to link it as follows: g++ -o testprogram.exe testprogram.o -L/usr/src/DynLib -lmylib This results in the error: /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld: cannot find -lmylib For information the entire output when executing make clean: rm -f PrintTest.o PrintTest.exe.exe PrintTest.d *~ make make[1]: Entering directory `/usr/src/dynlibtest' g++ -M -Wall PrintTest.cpp > PrintTest.d g++ -M -Wall PrintTest.cpp | sed s/\\.o/.d/ >> PrintTest.d make[1]: Leaving directory `/usr/src/dynlibtest' make[1]: Entering directory `/usr/src/dynlibtest' g++ -Wall -c -o PrintTest.o PrintTest.cpp g++ -o PrintTest.exe PrintTest.o -L/usr/src/DynLib -lmylib /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld: cannot find -lmylib collect2: ld returned 1 exit status make[1]: *** [PrintTest.exe] Error 1 make[1]: Leaving directory `/usr/src/dynlibtest' make: *** [clean] Error 2 When using: g++ -o PrintTest.exe PrintTest.o libmylib.so I get the error: collect2: ld terminated with signal 11 [Segmentation fault] Can someone tell me what I'm doing wrong? Kind regards, Wiebe de Vries. Pecoma * ICT-professionals * http://www.pecoma.nl Is deze e-mail niet voor u bedoeld? Laat het ons even weten. Bij voorbaat dank. Dit e-mailbericht is gecontroleerd op computervirussen met MIMEsweeper. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |