X-Spam-Check-By: sourceware.org Message-ID: <1138876123.43e1dedb6864d@portal.unileoben.ac.at> Date: Thu, 02 Feb 2006 11:28:43 +0100 From: vita AT unileoben DOT ac DOT at To: cygwin AT cygwin DOT com Subject: Re: 1.5.19-4: global constructors not working with dlopen() MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.4 X-IsSubscribed: yes 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 I tried your example duplicating your error. I played with it and change it little bit to get it to work. Instead of using printf() in your T1_dl.c I used cout and compiled it with g++ instead of gcc. Could it be you mixed C++ streams used in your T1 class with old C printf-family what brings your application in knee? I won't be surprised, I read somewhere that this two concepts should not be mixed. PV > I'm having trouble with global constructors/destructors not > executing/crashing within a dlopened DLL. > > I've attached a test-case. > FYI: This works fine with 1.5.13-1. > > Thanks for your help. > Martin > > ps: > Here's my shell log. > > Martin AT viper[523]$ make clean > /bin/rm -f T1_dl *.exe *.dll *.so *~ mapfile > Martin AT viper[524]$ make; ./T1_dl > g++ -Wall -Wl,-Map,mapfile -shared T1.cpp T1_inst.cpp -o T1_inst.dll > gcc -Wall T1_dl.c -o T1_dl > opening... > Martin AT viper[525]$ make nocygwin; ./T1_dl > g++ -Wall -mno-cygwin -shared T1.cpp T1_inst.cpp -o T1_inst.dll > gcc -Wall T1_dl.c -o T1_dl > opening... > T1 object created. > opened successfully > closing... > T1 object deleted. > closed > Martin AT viper[526]$ make t1inst; ./T1_inst > g++ -Wall -DT1_INST_EXE T1.cpp T1_inst.cpp -o T1_inst > T1 object created. > running > exiting... > T1 object deleted. > Martin AT viper[527]$ ---------------------------------------------------- Sent through the University of Leoben webmail system -- 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/