From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25316 invoked by alias); 2 Sep 2003 11:49:49 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 25300 invoked from network); 2 Sep 2003 11:49:47 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by sources.redhat.com with SMTP; 2 Sep 2003 11:49:47 -0000 Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19u9fu-0000kt-00 for ; Tue, 02 Sep 2003 13:50:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: cygwin@cygwin.com Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19u8BH-00085z-00 for ; Tue, 02 Sep 2003 12:14:35 +0200 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 19u8Ah-00050c-00 for ; Tue, 02 Sep 2003 12:13:59 +0200 From: Christian Neise Subject: Create dll using gcc Date: Tue, 02 Sep 2003 11:49:00 -0000 Message-ID: <1dq8lvg41amn969pckkf1gou2t4b3lh1l3@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Newsreader: Forte Free Agent 1.93/32.576 English (American) X-SW-Source: 2003-09/txt/msg00103.txt.bz2 Hello, i am trying to build a dll using cygwin and gcc. The dll will be used by a delpi application. The dll works fine. But when allocating memory (e.g.: char *c = new char) the programm crashes. When compiling the dll with visual c++ 6.0 SP5 the dll works fine - even if allocating memory. Any hints? Best regards, Christian Neise P.S.: I createdthe dll the following way: gcc -c dll_test.cpp -o debug/dll_test.o gcc -shared -o debug/dll_test.dll \ -L/usr/lib \ -Wl,--export-all-symbols \ -Wl,--enable-auto-import \ -Wl,--whole-archive debug/dll_test.o \ -L/usr/lib \ -Wl,--no-whole-archive -lc -lstdc++ testdll.h: #include extern "C" { __declspec( dllexport ) BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ); } testdll.cpp: #include "dll_test.h" BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } -- 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/