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. How to fix the Linking error

How to fix the Linking error

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpcsharpvisual-studiotutorial
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.
  • S Offline
    S Offline
    SIJUTHOMASP
    wrote on last edited by
    #1

    Hi, I have tried to build a project which has written in vc++/MFC. The project last build with 7.10 version and I am trying to build it using VS.Net 2003 and VC++ compiler version 7.1.3088. When it reaches to the part "Linking" start throwing the following type of link errors, error LNK2005: "private:_thiscall type_info::(classs type... error LNK2005 _abort already defined in libcmtd.lib(dbgheap.obj) etc I am sure , no error is there with the program and it is compiling fine..I would really appreciate if anybody can show me the right way to resolve these type of errors. Note: I have seen the existing project contains a file with ".odl" extension and I changed to ".idl" because I found while creating a new project it is creating ".idl". Thanks In Advance. Rahul

    SoftwareDeveloper(.NET)

    S 1 Reply Last reply
    0
    • S SIJUTHOMASP

      Hi, I have tried to build a project which has written in vc++/MFC. The project last build with 7.10 version and I am trying to build it using VS.Net 2003 and VC++ compiler version 7.1.3088. When it reaches to the part "Linking" start throwing the following type of link errors, error LNK2005: "private:_thiscall type_info::(classs type... error LNK2005 _abort already defined in libcmtd.lib(dbgheap.obj) etc I am sure , no error is there with the program and it is compiling fine..I would really appreciate if anybody can show me the right way to resolve these type of errors. Note: I have seen the existing project contains a file with ".odl" extension and I changed to ".idl" because I found while creating a new project it is creating ".idl". Thanks In Advance. Rahul

      SoftwareDeveloper(.NET)

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      That looks very much like you're linking your program against two versions of the C runtime library somewhere. The 'already defined in libcmtd.lib' bit gives it away. Can you check that all projects in the solution have the same runtime library selected in the C/C++->'Code Generation' property page?

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      S 1 Reply Last reply
      0
      • S Stuart Dootson

        That looks very much like you're linking your program against two versions of the C runtime library somewhere. The 'already defined in libcmtd.lib' bit gives it away. Can you check that all projects in the solution have the same runtime library selected in the C/C++->'Code Generation' property page?

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        S Offline
        S Offline
        SIJUTHOMASP
        wrote on last edited by
        #3

        Hi Stuart Dootson, Thanks much for your response. I have checked the runtime library and its same for all the projects. ("multi-threaded debug"(/Mtd)). One difference I found is that, some projects having Basic runtime checks as default and some having "both". When I tried to rebuild each project separately, only one project was showing link error ...All other projects got rebuilded file. Please let me know if you have any other suggestion. Thanks, Siju Thomas.

        SoftwareDeveloper(.NET)

        S 1 Reply Last reply
        0
        • S SIJUTHOMASP

          Hi Stuart Dootson, Thanks much for your response. I have checked the runtime library and its same for all the projects. ("multi-threaded debug"(/Mtd)). One difference I found is that, some projects having Basic runtime checks as default and some having "both". When I tried to rebuild each project separately, only one project was showing link error ...All other projects got rebuilded file. Please let me know if you have any other suggestion. Thanks, Siju Thomas.

          SoftwareDeveloper(.NET)

          S Offline
          S Offline
          SIJUTHOMASP
          wrote on last edited by
          #4

          Since I couldn't find a way to solve the linking error, I have tried to create a new project and replaced the automatically created files and added the files from the existing project..when I build that it was able to link with out any Issues..It didn't throw any linking error. But, I have got another error which is given below. while debugging "error PROJ0019: A tool returned an error code from "Performing Registration" While manually resistering the ocx " DLLRegister failed, Return code was: 0*80040200" Any idea to resolve this? Thanks, Rahul.

          SoftwareDeveloper(.NET)

          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