Linking multiple projects in MSVCpp...
Hello, I have produced a linker error in Visual C++ and it seems I lack the wits to resolve it. So, do anyone here have any suggestions?
What I want to do, is to have one workspace with two projects. In the first project I define the class "GUIMouse". Then I include the header file of this class in the second project. All source/header files for both projects are located in the same directory. Now, when I compile the second project that has GUIMouse as an external dependency I recieved this:
(...)SecondProject.obj : error LNK2001: unresolved external symbol "public: __thiscall GUIMouse::GUIMouse(void)" (??0GUIMouse@@QAE@XZ)
ReleaseSecondProject/SecondProject.exe : fatal error LNK1120: 3 unresolved externals.
I recieved one LNK2001 error for every GUIMouse member function I used. What am I missing? Any help would be appreciated.
/Anomaly Engine
I
The linker links on a per-project basis. It *does not* link together multiple .exe projects within a workspace.
Only projects can generate executable files, workspaces are just containers.
What we do is have *ONE* project which is an application (the game) and generates an .exe
All the other (engine) projects in the workspace generate .lib static library files as their output. The application project (the one which creates the .exe) links with these lib files.
--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
Only projects can generate executable files, workspaces are just containers.
What we do is have *ONE* project which is an application (the game) and generates an .exe
All the other (engine) projects in the workspace generate .lib static library files as their output. The application project (the one which creates the .exe) links with these lib files.
--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement