I have createprocess
witch lpCurrentDirectory
is Set to NULL
. I have changed my working directory to ..\Debug
in property window.
Then create process finds .exe file and program works without problems. Then I push my program with git to server. Then I create folder and clone from server that program. Problem is that when I or any other person clones that program working directory changes to default.
Then createprocess can't find .exe file. Most important thing here is that program must run on other computers without any modifications. So my questions would be:
Most important thing is that paths can't be written like this L"G:\CppProjects\ConsoleApplication1" because it won't work from other directory or other computers without small modifications. Any ideas are wellcome.
The Debugging settings for Visual Studio projects are considered user-specific, not project-specific. This is because these settings very often contain paths which are only guaranteed to exist on the workstation which sets them up. By design and by default, these settings are not committed to source control.
You CAN share these things by putting the whatever.vcxproj.user
file (from the same directory as whatever.vcxproj
) into source control. I wouldn't recommend doing that, however, because this file contains not only debugging settings, but also other workstation/user-specific settings that you may find problematic to share.