On Wed, Jul 22, 2009 at 06:07:43PM +0100, Keith Marshall wrote:
> On Wednesday 22 July 2009 16:36:16 Marc Vaillant wrote:
> > > 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.
> There was a FAQ about this, linked to an article on the old MinGWiki;
> I just migrated the article content into the new wiki:
> Marc, that article still shows the original aegisknight reference,
> which I notice redirects to the same address you give; do you think
> it may be prudent to update the reference? Or to write a derivative
> work, locally hosted, in case it moves again, maybe irretrievably?
Yes, might be good to locally host so that it doesn't disappear. I
don't know of any outdated info in the article. However, there are a
few typos in the code snips. I've emailed the author but he never got
back to me. Hmm, actually it might just be one typeo: he dropped the
DLLIMPORT macro on the factory method after Attempt #2.