Page 1 of 1

Sources on a different partition than project file (Windows)

Posted: Tue Mar 15, 2011 1:09 am
by czubaka
Hi,

Is it possible in CodeLite (under Windows, 2.9.0.4684) to have workspace/project files on a different partition than source code?

The reason I'm asking is because I've experienced a following issue:
- I created a new empty console project (removed default main.cpp) on partition O:
- I added to a project an existing source file with simple Hello World application, source file was located on a partition P:
- building fails with the message:

Code: Select all

----------Build Started--------
C:\Windows\system32\cmd.exe /c ""mingw32-make.exe"  -j 4 -f "appeartv_wsp.mk""
----------Building project:[ test - Debug ]----------
mingw32-make.exe[1]: Entering directory `o:/projects/appeartv/test'
mingw32-make.exe[1]: *** No rule to make target `/hello.cpp', needed by `Debug/hello.o'.  Stop.
mingw32-make.exe[1]: *** Waiting for unfinished jobs....
mingw32-make.exe: *** [All] Error 2
mingw32-make.exe[1]: Leaving directory `o:/projects/appeartv/test'
----------Build Ended----------
0 errors, 0 warnings
When I looked at project file I saw that paths to source files located on other partitions didn't have a drive letter at the front - they were relative to the root directory "/". So it was impossible to determine their proper location, therefore make failed.

So my question appears - is it currently possible to place sources on a different partion than the project files (in windows)? Maybe there's some workaround for this? Or maybe I just did something wrong?

Regards,
Czuba

Re: Sources on a different partition than project file (Windows)

Posted: Tue Mar 15, 2011 10:07 am
by eranif
czubaka wrote:So my question appears - is it currently possible to place sources on a different partion than the project files (in windows)? Maybe there's some workaround for this? Or maybe I just did something wrong?
No.

The workspace / files / projects must exists under the same drive

Eran

Re: Sources on a different partition than project file (Windows)

Posted: Wed Apr 06, 2011 2:10 pm
by Sandman
If your drives are local and use NTFS, a workaround is using mklink:

Code: Select all

O:\>mklink /J /D P_DRIVE P:\
Junction created for P_DRIVE <<===>> P:\
This creates a symbolic link P_DRIVE to your P:\ drive. Now it should be possible to add the sources, e.g. if you want to add P:\sources\source.cpp you now add: O:\P_DRIVE\sources\source.cpp which is in fact the same file. Hope this helps.