dllhelpers-0.2.5/c++ doesn't work

Larry Hall (RFK Partners, Inc) lhall@rfk.com
Fri Sep 22 07:46:00 GMT 2000


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@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@rfk.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@sourceware.cygnus.com



More information about the Cygwin mailing list