Re: [Dev-C++] problem using dll: is c++ error??!?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2004-04-22 08:53:14
|
One reason why gcc has changed is name-mangling is that gcc have also changed it's internal representation of objects and virtual method tables. It is - of course - only possible to link c++ code from two different compilers if calling conventions and memory layout of objects etc are identical betwen the two compilers. Any little difference would just result in a failing program. Sometimes just generating the wrong answer but most probably exploding because of a pointer error or similar. So the real problem isn't name mangling - which would be possible to solve by C stub functions or some playing around with compiler switches - but that the compilers must use a common ABI. See http://gcc.gnu.org/gcc-3.2/c++-abi.html for some more information. /Per W On Thu, 22 Apr 2004, OROSZI Bal=E1zs wrote: > Axel Bock wrote: > > BUT - du you have a solution? can you switch the name mangling from vc+= + > > to the dev-c++ model? is it *somehow* possible that this will ever work= ? > > can you convert the dll/lib/whatever, can you tell dev-c++ how to do i= t? > > No, sadly that will never be possible in the foreseeable future. > > To complicate things even more, GCC itself changes it's own name > mangling-scheme from time-to-time. That means for example, C++ libraries > (not just DLLs, but static ones also) that are compiled with GCC 3.2.3 > cannot be used with GCC 3.3.3, because of the name mangling changed > between these versions too. > I just added this as a side note, because it caused quite a lot of > headache for me until I figured this out... :) > > -- > Greetings, > Bal=E1zs > > > ---- |