Web lists-archives.org

[Mingw-users] Using mscv dlls containig c++ classes in mingw




Hy!

I am trying to use a dll (respecively its .lib) that I have compiled
natively with msvc++ under linux and mingw. I read quite a lot of tips on
the web, plus the coresponding mingw FAQ entry (
http://www.mingw.org/mingwfaq.shtml#faq-msvcdll ), but to no avail.

No matter if I try to compile a program with the -lib file from msvc
directly (/usr/local/mingw/i386-mingw32msvc/bin/g++  sigg_scanslots.cpp
acertsc.lib) or if I am first creating a .a file from the lib with reimp
and dlltool (/usr/local/mingw/i386-mingw32msvc/bin/g++  sigg_scanslots.cpp
-L. -lacertsc), I always get undefined references for every single
function I use, expect for pure C function defined in the header as 
'extern "C" ', but not for anything using c++.

I tried to define the functions in the header with _declspec(dllimport)
and without it, the only difference it made, was the the "undefined
reference" messages where pretty (pcsc::Connect(unsigned int)) or not
(__imp___ZN4pcsc7ConnectEj).

I am quite desperate, I hope that some of you can help.

cheers
Mathias


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users