VC6 to VS.NET 2002 Port Errors
-
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?
-
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?
-
You have "DLL Hell": different versions of MFC. There is not way out: You got to recompile the static lib!!! :~
Greetings from Germany
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(
-
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(