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