From: Marc V. <vai...@fa...> - 2009-07-22 15:50:54
|
On Wed, Jul 22, 2009 at 11:36:16AM -0400, Marc Vaillant wrote: > On Wed, Jul 22, 2009 at 03:52:26PM +0200, Jan Herling wrote: > > Hallo everyone, > > > > I just found out (with a hint of Bob) that the tutorial about GCC Dlls > > and MSVC on mingw.org works for C functions only. > > Meaning that C++ functions / class can not be exported with GCC and > > imported with MSVC (at least with respect to the tutorial). > > As far as I understand (I'm new to GCC) this depends on different > > function export/import names between GCC and MSVC. > > > > Therefore: Has anyone an idea how to mix C++ GCC Dlls and C++ MSVC > > applications without special "extern C" workarounds? > > I need fully access to my C++ code and classes. Perhaps there is a > > different tutorial? > > Yes, read the following article carefully: > http://chadaustin.me/cppinterface.html. Basically, if you write your > classes to have only virtual functions, they don't need to be exported. > Then you will just need C mangled factory methods to create and destroy > instances of them. Correction: C mangled factory methods => exported C mangled factor methods. |