What is the equivalent of $(ProjectDir) and $(TargetDir) in CLion and how to change?
已回答
Hi!
I need to set my working directory points to the folder with the executable because files are searched relative to that. In Visual Studio that is the same as $(TargetDir)
. The default is $(ProjectDir)
in Visual studio (which will not work for my case!).
So, my question is, how to change the and set the working directory in CLion? I am using Ubuntu 22.04.
请先登录再写评论。
Hello!
>I need to set my working directory points to the folder with the executable because files are searched relative to that
This is the default value for the "Working directory" field, so you don't need to change anything.
You meant this? Adding manually the file path? Different for debug and release?
The default value for this field is the build directory where the resulted executable is located. Therefore you don't need to specify anything in this field, since the default value is exactly what you need, as far as I understand.