This is the mail archive of the
mailing list for the Cygwin project.
Re: Urgent !!! Reg Linking sybase DLL in cygwin.
- From: "Mani kandan" <kvmani76 at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 28 May 2008 10:30:39 +0530
- Subject: Re: Urgent !!! Reg Linking sybase DLL in cygwin.
> Yes, I am not able to link directly sybase .dll in g++ compiler in cygwin.
> I have created .def file with help of dumpbin command. I have
> modified the .def file.
> My .def file will be
> With help of dlltool command i have created .a file also. Now i can
> able to link and
> i got the EXE also. But while running the exe, i got the error message
> _cygtls::handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
> I want to clarify the following things
> (i) Can i use dumpbin to get the .def file?
> (ii) Why the exception thrown ?
> But when i run the same sample code arith.cpp in windows
> environment, i am getting the result.
You are meaning with MSVC?
Or with mingw32 g++?
You cannot link a c++ dll with a different compiler / linker at all in general.
If this sybase.dll was not generated with the cygwin g++, you will not be able
to link to it with the cygwin g++.
There is the simple name mangling issue which you circumvented with
the explicit .def file,
and there is the conflict of underlying exceptions and memory models.
A new/free in the sybase dll will not cooperate with a cygwin
new/free. A sybase.dll exception will not be caught
by your cygwin app.
If it was generated with MSVC you have to use MSVC.
Ask your vendor for a cygwin dll or sourcecode.
I have created sample.dll in MSVC++ and i am able to link that dll
in cygwin environment.
Even i have tried with some other dlls which is generated in MSVC++,
i am able to link and that EXE's also
working fine. As you suggested the vendor are not support the cygwin
environment and they didn't agree to give the
source code also. The only option is I have to link some other way
that sybase dll in cygwin.pls help.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html