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 From: "Reiner Suikat" To: "Cygwin Mailing Liste" Subject: Problems making a dll with c++ Date: Thu, 3 Aug 2000 15:52:57 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Hello, I'm trying to port some big pieces of software to Cygwin, so we can run it on a Windows 200 machine. This involves building several dlls from C++ code. And there I'm running into trouble. I tried the commands given in the User Manual, and I'm getting the following: With a simple c-program (mydll.c, basically the code snippet with mydll_init and a small test function): the first line from the user manual results in: $ gcc -s -Wl,--base-file,mydll.base -o mydll.dll mydll.o -Wl,-e,_mydll_init AT 12 /usr/lib/libcygwin.a(libcmain.o)(.text+0x6a):libcmain.c: undefined reference to 'WinMain AT 16' collect2: ld returned 1 exit status What is goin on? Why do I need a main in a dll? Using a just as simple c++ file (basically the same, but now the test function uses cout and its includein iostream.h): $ g++ -s -Wl,--base-file,mydll.base -o mydll.dll mydll.o -Wl,-e,_mydll_init AT 12 Uusr/bin/ld: warning: cannot find entry symbol _mydll_init AT 12; defaulting to 00401000 /usr/lib/libcygwin.a(libcmain.o)(.text+0x6a):libcmain.c: undefined reference to 'WinMain AT 16' collect2: ld returned 1 exit status (when I tried gcc instead of g++ it also returned a lot of undefined references to iostream stuff) Can anybody tell me what I'm missing or point me to some documentation about c++-dlls in Cygwin?? Thanks for your help Reiner Suikat -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com