Problems creating "-mno-cygwin" DLLs with libtool.

Vladius boxforsr@inbox.ru
Tue Feb 1 15:23:00 GMT 2005


I have problems compiling DLLs with -mno-cygwin flag, using libtool.

Command is: libtool --mode=link --tag=CXX g++ -rpath 
/Projects/Tests/libtool -mno-cygwin -no-undefined -o libcommon.la common.lo
Output:
rm -fr  .libs/libcommon.a .libs/libcommon.la .libs/libcommon.lai
g++ -shared -nostdlib /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/crtbegin.o  
.libs/common.o  -L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3 
-L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../.. -lstdc++ -lgcc -lcygwin 
-luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc 
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/crtend.o  -mno-cygwin -o 
.libs/cygcommon-0.dll -Wl,--image-base=0x10000000 
-Wl,--out-implib,.libs/libcommon.dll.a
ar cru .libs/libcommon.a  common.o
ranlib .libs/libcommon.a
creating libcommon.la
(cd .libs && rm -f libcommon.la && ln -s ../libcommon.la libcommon.la)

    As U can see... it automatically passes -lcygwin flag to the 
linker(g++). When cygcheck'ing resulting DLL it lists cygwin DLL as one 
of its dependencies.
I heard somewhere that cygwin is requierd for DLL initialisation, is it 
true?
The interesting thing is that linking against resulting DLL with 
so-called "-mno-cygwin -lcygwin" mix results in program startup 
failure(no errors, it just hangs).
    Any ideas on how to create cygwin independent DLL with libtool?



--
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/



More information about the Cygwin mailing list