Did you succeed in linking cygnus to VC++?

Andrew Lipnitsky ert@cit.org.by
Sun Jan 31 23:52:00 GMT 1999


"S. Krishnaprasad" wrote:

> I tried the solution from Mumit Khan and of Andrew Lipnitsky
> but even though it created the Dll for me with the import library
> and the def file i am not able to use it.

--<sniped>---

>
> The application tried to reference memory (xxxxxxxxx) and
> memory at location (yyyyyyyyyyy) could not be written or something
> and the application exits.

To avoid it try produce import library by LIB.exe  utility program from VC6
instead of dllwrap.


>
> -----Original Message-----
> From: pakkio@dianos.it <pakkio@dianos.it>
> To: s.krishnaprasad@tatainfotech.com <s.krishnaprasad@tatainfotech.com>
> Date: Thursday, January 28, 1999 5:39 AM
> Subject: Did you succeed in linking cygnus to VC++?
>
> >working: at linking it says something like unresolved external symbol xxxx
> >and the game is over.
> >

You can use dll only in C language (not C++) because name mangling is
different in VC and GCC. That is your dll must
be compiled with gcc (or your export function must be defined as extern "C" ).
And so in your VC application definition of that functions looks something like:

extern "C"
__declspec(dllimport) void __cdecl my_function_from_dll();


>
> >
>
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request@cygnus.com" with one line of text: "help".

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list