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 Message-ID: <002501c220a9$34b25720$2801a8c0@dcuthbert2k> From: "Dylan Cuthbert" To: "Gerrit @ cygwin" Subject: Re: Building dlls with cygwin Date: Mon, 1 Jul 2002 11:44:19 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Hi there, I got a little bit further - I had to add -L /usr/local/lib so it pulls the correct libs for my locally compiled gcc 3.1. However, still get these errors (a much shorter list!): g++ -shared -Wl,--out-implib=common.dll.a -o common.dll *.o -Wl,--export-all-symbols -L /usr/local/lib -lm -lstdc++ 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 Creating library file: common.dll.a [some elapsed time] Actually I got around this by specifying -Wl,--exclude-symbol,_bss_end__,_bss_start__ etc etc. Now when I link with common.dll the result executable runs, but then crashes in some obscure stdlib file, tinfo2.cc. I'll investigate further Thanks for the help -- --------------------------------- Q-Games, Dylan Cuthbert. http://www.q-games.com "Gerrit P. Haase" wrote in message news:5599464412 DOT 20020630140853 AT familiehaase DOT de... > Hallo Dylan, > > Am Sonntag, 30. Juni 2002 um 11:49 schriebst du: > > > Hi there, > > > I have tried making a dll in the way you describe, however I get the errors > > below. > > > Have you seen similar errors to this in your library creation? Am I making > > a simple mistake here? > > undefined reference to `std::.... > > You must link against the relevant importlibs. Here libstdc++ > > Means: > gcc -shared -Wl,--out-implib=common.dll.a -o common.dll *.o \ > -Wl,--export-all-symbols -lstdc++ > > For libstdc++ this is done automatically if you use g++: > g++ -shared -Wl,--out-implib=common.dll.a -o common.dll *.o \ > -Wl,--export-all-symbols > > > Gerrit > -- > "All faults& bugs are mine - Robert" > from squid/acinclude.m4, Sun Apr 21 05:21:21 2002 > > > -- > 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/ > > -- 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/