How do I set the path to a DLL file in Visual Studio? -
I have developed an application that depends on a DLL file. When I debug my application, the application will complain that:
"This application failed to start because xxx.dll was not found."
So I have to copy the DLL file into the same directory as my .vcproj file.
Is there a way to set up a project to see the DLL file in a relative (preferably)? Path or (not like) some full path?
A similar concept to how we set and set the library path in the project settings.
I mean when I debug my application (killing F5 ) the above error will pop up.
- Go to project property (Alt + F7)
- debugging Under, look on the right
- is an environment field.
- Add your relative path there (relative to the Vcproj folder) i.e. .. some frameworks \ lib
PATH =% PATH%; $ (ProjectDir) \ some-framework \ lib
by adding or pathPATH = C: \ frame some work \ lib;% PATH%
- Again F5 (debug ) Hit and it should work.
Comments
Post a Comment