In the development process, it is unavoidable to refer to header files, library files, and set the output location of the program.
Absolute path
The simplest way of these paths is to write dead, written in absolute paths.
The problem with absolute paths is that you copy items to other computers. Because there is not necessarily a directory on other machines.
The relative path is better! Because the project's engineering code can be compiled and run directly wherever it goes.
Relative path relative path relative to where? Relative to the current directory.
Where is the current directory? The directory where the VCPROJC file resides is the current directory.
Note the directory where the SLn file is located!
A sln can have more than one project, and the current directory for each project project is the same directory as its corresponding VCPROJC file.
Configuration file
The resource files needed at runtime are best not to use relative paths, where do users like to write these things? So, the runtime requires resources that you'd better use to read the configuration file in the same way.
Configuration file read, there are a variety of ready-made tools, XML, text, write their own line, anyway the idea is this.
All right, the problem with setting up a directory with Visual Studio is all solved! Regret that I did not write a blog before, this project wasted I have one hours of time, greatly reduced the development of pleasure.
Visual Studio 2010 Directory path settings and team development