REt: Creating DLLs using c++/g++

Danny Smith
Tue Apr 2 13:56:00 GMT 2002

> From: Suhanthan Vanniyasingam <Suhanthan at eRunway dot com>

> I have created DLLs by using the following command
>	"gcc -Wl,--out-implib,libmydll.import.a -shared -o mydll.dll
> mydll.o"
> and used with a VC++ application.

> But I have tried the same command with c++ and g++. It's creating the
> But the functionality is not accessible by VC++ application.

Its not a dll problem, its a difference in C++ ABI. You can't generally mix
object code from different C++ compilers. In fact different versions of
same compiler (say G++-2.x and G++-3.x) produce incompatable C++ code.
Different compilers use different name-mangling schemes to protect users
from problems that arise when mixing ABI's. 

There are attempts to standardize C++ ABI across compilers, but that has
not happened yet.  

Danny - Auctions
- 1,000s of Bargains!

Unsubscribe info:
Bug reporting:

More information about the Cygwin mailing list