This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Problems using a DLL created with GNU from Microsoft VC++


>On Tuesday 8 Aug 00, Kenneth Sandberg (ERA) writes:
>> I am trying to use a DLL created with cygwin g++ from an application
>> created with Microsoft Visual C++. The reason is that I have C-code
>> (huge) that is created for GNU and would like to use it in an
>> application that requires Microsoft Visual C++.
>
>The FAQ says:
>
>	Can I mix objects compiled with msvc++ and gcc?
>	
>	Yes, but only if you are combining C object files. MSVC C++
>	uses a different mangling scheme than GNU C++, so you will
>	have difficulties combining C++ objects.
>
>Does that apply to you?
>
>David

No, I think the problem occurs when a function using the memory is called.
It works if the printf()-statement is deleted from the DLL. In this case,
the DLL only performs one add. The same thing happens even if there isn't
any arguments passed to the function.

I think the problem resides in the cygwin1.dll. Maybe there is an
initialization call missing in the DLL when the DLL is called from a MC++
compiled program? If the DLL is called from a cygwin-compiled code, it
works. Is this case, the cygwin1.dll is already initialized by the calling
program.

/Kenneth Sandberg

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]