Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: 18 Mar 2001 06:41:39 -0000 Message-ID: <20010318064139.88232.qmail@rootlabs.com> From: nate AT rootlabs DOT com To: cygwin AT cygwin DOT com Subject: Building non-cygwin DLL with cyg-gcc I am trying to build a project that was written using MSVC. I'm starting with a basic DLL. Compiling the .c file with gcc blew chunks but -mno-cygwin got it to compile. Now I'm having problems linking. There seem to be two methods of building DLLs, the User Guide method (invoke dlltool multiple times) and the recent Mailing List method (use the undocumented --output-implib ld switch). If I do the ML method, I get > gcc -Wl,--out-implib,file.a -shared -o file.dll file.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 Creating library file: Packet.a collect2: ld returned 1 exit status make: *** [main] Error 1 And of course, this makes sense because ld seems to be trying to export all symbols. I have my own .def file with the desired exports listed, but I can't figure out how to get ld to use it. It seems like ld has no equivalent of the --def switch of dlltool (shown in the UG method). Is it possible to get ld to reference an exports file using the ML method? If not, what's the recommended method for building a non-cygwin DLL using cyg gcc? BTW, I still can't figure out the difference between mingw, w32api, and -mno-cygwin. I assume they're all different pieces of the same codebase. Thanks, Nate Tool versions gcc version gcc-2.95.2-9 19991024 (cygwin experimental) GNU ld version 2.10.91 (with BFD 2.10.91) GNU dlltool 2.10.91 -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple