Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Name Mangling between VC5 & VC6.

Name Mangling between VC5 & VC6.

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gerry
    wrote on last edited by
    #1

    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.

    T 1 Reply Last reply
    0
    • G 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.

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      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

      G 1 Reply Last reply
      0
      • T Tomasz Sowinski

        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

        G Offline
        G Offline
        Gerry
        wrote on last edited by
        #3

        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.

        T 1 Reply Last reply
        0
        • G 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.

          T Offline
          T Offline
          Tomasz Sowinski
          wrote on last edited by
          #4

          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

          G 1 Reply Last reply
          0
          • T Tomasz Sowinski

            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

            G Offline
            G Offline
            Gerry
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups