How to dynamically set the header and source file paths without hardcoding them in Visual studio settings?
I am having a project that is stored in E:/Code/GCS/utilities. I have some libraries also in utilit开发者_Python百科ies folder. Is there any way I can do some sort of settings that if I transfer this project on some other machine the compiler automatically find out the header/source files and libraries path.
Yes, just use relative paths in the include paths in the project settings. The include paths should be relative to the project file. Your headers, sources and libs are already stored with relative paths within the project file so you don't have to worry about those.
精彩评论