lists.zerezo.com



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

***BOGO*** Re: [Mingw-users] trouble converting a MSVC lib



Hi Christopher,

> Brian Dessent wrote:
>> These symbols have been mangled, meaning they have C++ linkage,
>> meaning the header did not declare them 'extern "C"'.  If they
>> really have C linkage then you need to either a) compile your
>> source with a C compiler and not a C++ compiler, or b) edit the
>> header so that they are declared 'extern "C"'.

Christopher Harvey writes:
> When you said "edit your header", do you mean, "edit your header and
> re-compile the dll" or did you mean "edit your header and recompile
> the application that is calling the dll"?

Brian probably means the latter.

> I can't say if it's a C or C++ dll, but one thing is for sure all
> the functions are C compatible.

If the DLL's interface is C-only, you can use option c) (;-)) and
include the header in your C++ source like this:

  extern "C" {
    #include "NPRigidBody.h"
  }

That way you get the effect of option b), but you need not touch the
header.

benny

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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