delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/09/22/10:47:37

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-Id: <4.3.1.2.20000922104402.01f74c88@pop.ma.ultranet.com>
X-Sender: lhall AT pop DOT ma DOT ultranet DOT com
X-Mailer: QUALCOMM Windows Eudora Version 4.3.1
Date: Fri, 22 Sep 2000 10:45:14 -0400
To: Nigel Wetten <nigel DOT wetten AT element-14 DOT com>
From: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
Subject: Re: dllhelpers-0.2.5/c++ doesn't work
Cc: cygwin AT sources DOT redhat DOT com
In-Reply-To: <39CB6F43.B5E65296@element-14.com>
Mime-Version: 1.0

At 10:40 AM 9/22/2000, you wrote:
>Without touching the source, compiling the c++ example leads to warnings
>about not being able to find __cygwin_dll_entry AT 12. When executed, the
>binary puts a message box saying
>"The dynamic link library cxxdll.dll is not written correctly. The stack
>pointer has been left in an inconsistent state. The entrypoint should be
>declared as WINAPI or STDCALL" 
>Effectively the program cannot run.
>
>Adding the following to dllclass.cc to try to address the above problem:
>
>extern "C" {
>
>#include <windows.h>
>
>   int WINAPI
>   _cygwin_dll_entry(HANDLE h, DWORD reason, void *foo)
>   {
>     return 1;
>   }
>}
>
>solves the build warnings. When run, the program produces the following
>output:
>Global integer variable = 5
>DllClass 1 (Imported from DLL):
>   virtual_method = 0
>   non_virtual_method = 0
>   instances = 0
>DllClass 2 (Imported from DLL):
>   virtual_method = 0
>   non_virtual_method = 0
>   instances = 0
>DllClass (Local):
>   virtual_method = 27
>   non_virtual_method = 9
>   instances = 1
>
>The README file shows different output. The above is clearly the result
>of a bug. In particular, with the latest cygwin net release, I am unable
>to get constructors run on global objects. I'm guessing this is why
>using iostreams in a dll leads to a crash.
>Does anyone have a solution? Suggestions? 
>Or perhaps the necessary build commands changed?
>
>Nigel

Check the mail archives for the entry point you're having problems with.
You'll find a reference to this entry point and a solution there.





Larry Hall                              lhall AT rfk DOT com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019