Sources on a different partition than project file (Windows)

General questions regarding the usage of CodeLite
czubaka
CodeLite Curious
Posts: 1
Joined: Tue Mar 15, 2011 12:57 am
Genuine User: Yes
IDE Question: C++
Contact:

Sources on a different partition than project file (Windows)

Post by czubaka » Tue Mar 15, 2011 1:09 am

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

User avatar
eranif
CodeLite Plugin
Posts: 6122
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif » Tue Mar 15, 2011 10:07 am

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
Make sure you have read the HOW TO POST thread

Sandman
CodeLite Curious
Posts: 7
Joined: Wed Apr 06, 2011 1:37 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by Sandman » Wed Apr 06, 2011 2:10 pm

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.
-- Sandman

Post Reply