I have created solution using Visual Studio C++ 2010 Express which has two EXE projects and a DLL project - a game, game editor and the shared code. Since having switched to a more 'industry standard' directory structure I've been getting a "program can't start because xxx.dll is missing" error. I've added all the dependancies and references, made sure 'Copy Local' is set to true, etc (the 'Reference Properties' even shows the correct full path of the dll), but there isn't a local copy of the dll in the project output directory when I compile the solution. I can get around the error by manually copying the dll, but it would seem that Visual Studio should be doing this for me. Can you suggest why Visual Studio might not be doing this, have I missed a setting somewhere?
Crossbones+ - Reputation: 6627
Posted 25 March 2013 - 11:29 AM
This post explains one way to do it.
How you set it up really depends on you. I generally create a shared folder ( projectroot/dlls ) for example that all generated and 3rd party dlls are put in. In this case, I simply invoke a copy command as a post build command in my dll projects. Then in your other projects, you add this folder path as a dependency. However, this requires you to update dependencies manually ( if your DLLs change, this dependency isn't known across the various projects ).