This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Creating DLL's for use with MSVC
On Wed, 10 Mar 2004 14:21:41 +0100, Niklas Wallin wrote in
<DEA1FE60-7295-11D8-B092-000393C92B12@foi.se>:
Hi Niklas,
>
>Thanks for your answer Alejandro, I still can't get it right though.
You are welcome, but this has truly veered into the realms of the
off-topic.
So in order to pull it back on track, let's do a 'Gendankexperiment'
and suppose neither you or I ever mentioned the flag "-mno-cygwin".
Let's suppose instead that you managed to compile Tendra++ and want to
use Cygwin's GNU g++ to create a DLL with an import library that could
be used by the other compiler.
>
>Ok, the .def file then looks like this:
>
>EXPORTS
> _ZN7MyClass8getValueEv @1
> _ZN7MyClass8setValueEi @2
> _ZN7MyClassC1Ev @3
> _ZN7MyClassC2Ev @4
> _ZN7MyClassD1Ev @5
> _ZN7MyClassD2Ev @6
As CGF pointed out earlier, g++ and your other compiler decorate
functions differently, but you could create an exports aliasing table
in the DLL:
"""
LIBRARY mylibrary
DESCRIPTION "Blah, blah."
EXPORTS
getValueEv = _ZN7MyClass8getValueEv @1
.
.
.
Ev2 = _ZN7MyClassD2Ev @6
"""
This is GNU binutils' equivalent to private function declarations in
that other win32 compiler.
Now, I can't say this will work for you, but it works for a couple of
things I use everyday...
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/