Advertisement Jump to content


This topic is now archived and is closed to further replies.


Linking multiple projects in MSVCpp...

This topic is 6122 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post

Link to post
Share on other sites
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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!