Problems while setting working dir apart from build dir

CodeLite installation/troubleshooting forum
derkomai
CodeLite Enthusiast
Posts: 10
Joined: Wed Nov 18, 2015 4:47 pm
Genuine User: Yes
IDE Question: C++
Contact:

Problems while setting working dir apart from build dir

Post by derkomai »

Hi,

I'm having some trouble with a codelite project. I need to set a directory as my sources dir, another dir as the build dir and another one for the data dir. When ran, working dir should be set to data dir and executable on the build dir should be called form there. But I can't figure out what i'm missing.

The project works OK when I copy data into build directory, but when I move data into 'data dir' and set my working dir to it (Project settings > General > Working directory), the program complains about not finding the executable as it was looking for it in my working dir.

I've prepared a test project where this behaviour is replicated. What am I missing here?

Thanks in advance.
derkomai
CodeLite Enthusiast
Posts: 10
Joined: Wed Nov 18, 2015 4:47 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problems while setting working dir apart from build dir

Post by derkomai »

Ok, so I figured out the thing. The solution consists in getting right the following project settings:

- Customize > Custom build > Working Directory: set this to build dir. (The name "working directory was confusing me")
- General > Working directory: set this to data dir, but now codelite searches here the binaries, so we have to check our third setting.
- General > Executable to run/debug: path to our binaries.

Now it seems to work, but I don't get why binaries are searched inside the working directory when I first specified my build directory. Anyone can shed some light on this?

Thanks.
Post Reply