delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT sources DOT redhat DOT com |
Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
Message-ID: | <3A880E1B.2461E7F5@ece.gatech.edu> |
Date: | Mon, 12 Feb 2001 11:23:55 -0500 |
From: | "Charles S. Wilson" <cwilson AT ece DOT gatech DOT edu> |
X-Mailer: | Mozilla 4.75 [en] (WinNT; U) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
To: | Patrick Reuter <preuter AT uni-hohenheim DOT de> |
CC: | cygwin AT sources DOT redhat DOT com |
Subject: | Re: Build libraries with gcc |
References: | <3A880D73 DOT 341264A5 AT uni-hohenheim DOT de> |
g++ -shared doesn't do what you think. It doesn't build unix-style shared libraries. It builds windows DLL's, which *MUST* end in .dll if you want the windows loader to load them into memory for your linked app. If you want a static lib, leave out the -shared. If you want a DLL, you probably need to do a mailing list search on "building a DLL"; it is likely that you will need to modify the source code (hint: __declspec(dllexport) and __declspec(dllimport) decorations). Take a look at the source code and Makefiles in the ncurses-5.2-4-src.tar.gz packge (especially in the c++/ directory). --Chuck Patrick Reuter wrote: > > Hello, > > I have a question building libraries using gcc under cygwin. > > When compiling in Linux/Unix, I have no error message. When compiling > under Windows, I get the following error message with any of my > libraries: > > g++ -shared -pg -o libGIF.so main.o readGIF.o writeGif.o > > Cannot export _bss_end__: symbol not defined > Cannot export _bss_start__: symbol not defined > Cannot export _data_end__: symbol not defined > Cannot export _data_start__: symbol not defined > Cannot export _monstartup: symbol not defined > main.o(.text+0x31):main.c: undefined reference to `_monstartup' > collect2: ld returned 1 exit status > > Tank you for any help!! > > Patrick > > -- > Want to unsubscribe from this list? > Check out: http://cygwin.com/ml/#unsubscribe-simple -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |