No DLL local copy

Started by
2 comments, last by Draycos 11 years ago

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?

Advertisement

You can set the output path in the linker output options panel for the dll project.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

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 ).

This post explains one way to do it.



Cool, thanks for the info. I think I just need to concrete my project directory layout, as nicely illustrated in your link.

This topic is closed to new replies.

Advertisement