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. VC6 to VS.NET 2002 Port Errors

VC6 to VS.NET 2002 Port Errors

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studioc++debugginghelp
4 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.
  • J Offline
    J Offline
    Jason Teagle
    wrote on last edited by
    #1

    I'm trying to port a project (workspace / solution) from VC6 to .NET 2002. The workspace consists of a DLL front-end, a DLL back-end, and a static library of utilities. They depend on each other in the order listed. In Release and Debug under VC6, they compile (rebuild all) with no problems whatsoever. When I import the projects into a new workspace in VS7 and rebuild all, I get a big wodge of linker errors like this: yyy error LNK2005: "public: __thiscall CPoint::CPoint(int,int)" (??0CPoint@@QAE@HH@Z) already defined in xxx.lib(xxx.obj) where xxx is the static library back-end. I used Project Dependencies to instruct VS7 as to which project depended on which; if I do not, I get linker errors regarding classes in the static lib needed by the middle layer (I haven't even got to the front end). Both static lib and DLL are multi-threaded. Curiously, it's MFC simple classes like CRect, CSize, CPoint and their member functions that are involved; none of our classes or methods. Any ideas on how to resolve this, and why it changed between Visual Studio versions?

    K 1 Reply Last reply
    0
    • J Jason Teagle

      I'm trying to port a project (workspace / solution) from VC6 to .NET 2002. The workspace consists of a DLL front-end, a DLL back-end, and a static library of utilities. They depend on each other in the order listed. In Release and Debug under VC6, they compile (rebuild all) with no problems whatsoever. When I import the projects into a new workspace in VS7 and rebuild all, I get a big wodge of linker errors like this: yyy error LNK2005: "public: __thiscall CPoint::CPoint(int,int)" (??0CPoint@@QAE@HH@Z) already defined in xxx.lib(xxx.obj) where xxx is the static library back-end. I used Project Dependencies to instruct VS7 as to which project depended on which; if I do not, I get linker errors regarding classes in the static lib needed by the middle layer (I haven't even got to the front end). Both static lib and DLL are multi-threaded. Curiously, it's MFC simple classes like CRect, CSize, CPoint and their member functions that are involved; none of our classes or methods. Any ideas on how to resolve this, and why it changed between Visual Studio versions?

      K Offline
      K Offline
      KarstenK
      wrote on last edited by
      #2

      You have "DLL Hell": different versions of MFC. There is not way out: You got to recompile the static lib!!! :~

      Greetings from Germany

      J 1 Reply Last reply
      0
      • K KarstenK

        You have "DLL Hell": different versions of MFC. There is not way out: You got to recompile the static lib!!! :~

        Greetings from Germany

        J Offline
        J Offline
        Jason Teagle
        wrote on last edited by
        #3

        Unfortunately this is not the problem - it was from a full recompile. The lowest project compiles fine; when I try and compile the layer above, which depends on it, it then throws out the multiply defined symbols. I already compiled the static lib again {:v(

        K 1 Reply Last reply
        0
        • J Jason Teagle

          Unfortunately this is not the problem - it was from a full recompile. The lowest project compiles fine; when I try and compile the layer above, which depends on it, it then throws out the multiply defined symbols. I already compiled the static lib again {:v(

          K Offline
          K Offline
          KarstenK
          wrote on last edited by
          #4

          Static linking of the MFC is the bug. You cant do that. Blame MS for it!!!:~

          Greetings from Germany

          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