Name Mangling between VC5 & VC6.
-
I have a dll written by a third pary vendor. It works perfect in vc5, the linkage import section looks external for _myfunc@PU8 In VC6 it looks externally for _myfunc@QU8 The dll exports _myfunc@PU8 How can I resolve this name mangling on linkage in VC6? Gerry.
-
I have a dll written by a third pary vendor. It works perfect in vc5, the linkage import section looks external for _myfunc@PU8 In VC6 it looks externally for _myfunc@QU8 The dll exports _myfunc@PU8 How can I resolve this name mangling on linkage in VC6? Gerry.
Name mangling is implemented in a compiler-specific way. It seems that MS changed the mangling rules between 5 and 6 releases. You'll have to ask the vendor to recompile the code in VC 6. I'm assuming that they gave/sold you the DLL, import library and header files only (no full source). Tomasz Sowinski -- http://www.shooltz.com.pl
-
Name mangling is implemented in a compiler-specific way. It seems that MS changed the mangling rules between 5 and 6 releases. You'll have to ask the vendor to recompile the code in VC 6. I'm assuming that they gave/sold you the DLL, import library and header files only (no full source). Tomasz Sowinski -- http://www.shooltz.com.pl
Question:- Vendor DLL has export function _Func@PQU3 I link explicitly to dll in a static library & export this function to my static library, the static lib has _Func@BQU3, bit of a different. Can I not override my staticlib export to correspond to the dll or drop the mangling extern "C"...let the compiler find the required function? Gerry.
-
Question:- Vendor DLL has export function _Func@PQU3 I link explicitly to dll in a static library & export this function to my static library, the static lib has _Func@BQU3, bit of a different. Can I not override my staticlib export to correspond to the dll or drop the mangling extern "C"...let the compiler find the required function? Gerry.
Oops - so you're able to compile your code in VC6 and linking with your vendor's import library (compiled in VC5) works? Tomasz Sowinski -- http://www.shooltz.com.pl
-
Oops - so you're able to compile your code in VC6 and linking with your vendor's import library (compiled in VC5) works? Tomasz Sowinski -- http://www.shooltz.com.pl
Note: All the dlls, exe's work well in VC5. I have a staticlib that all my exe's use, the staticlib links to the vendors dlls' in VC6. The staticlib compiles/links ok. But if I look a the lib file & the vendor dll,using dumpbin I notice that the name mangling has changed in the lib file. I then try to recompile one of my exe's with the new lib file. I get an unresolved external, due to the different name mangling.... Gerry.