CB 5535, Vista
CB 5607, Debian Lenny
I'm using CB to write applications which are portable between Windows and Linux. So I've got one workspace file gathering all my projects. Every project has Build Targets for Windows and Linux. The projects are hosted on Windows below a directory named "C:\_workspaces".
Linux is running as Colinux on the same computer. The C:\_workspaces directory is mounted via cofs in /mnt/_workspaces. To simplify the path, I've created a symbolic link named /_workspaces. (Yes, I'm working as root - no security hints please... :D )
Short form: C:\_workspaces in Windows == /_workspaces in Linux.
My problem is, that the workspace file contains relative paths for my projects while using Windows, but unfortunately absolute paths while using Linux. That means I've to write a separate workspace file for every OS :cry:
To make the item more clear, here are the workspace files:
Windows workspace file
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="Default workspace">
<Project filename="_prj\libsmtp-0.8.5\libsmtp-0.8.5.cbp" active="1" />
<Project filename="_prj\ctools\ctools.cbp" />
<Project filename="_prj\htm_work\htm_work.cbp" />
<Project filename="_prj\htm_term\htm_term.cbp" />
<Project filename="_prj\smsrecvd\smsrecvd.cbp" />
<Project filename="_prj\zdbserv\zdbserv.cbp" />
</Workspace>
</CodeBlocks_workspace_file>
Linux workspace file
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="Default workspace">
<Project filename="../../../../mnt/_workspaces/_ver3-n_3_5_03_001/_ver3/_32cnvt/_prj/libsmtp-0.8.5/libsmtp-0.8.5.cbp" active="1" />
<Project filename="../../../../mnt/_workspaces/_ver3-n_3_5_03_001/_ver3/_32cnvt/_prj/ctools/ctools.cbp" />
<Project filename="../../../../mnt/_workspaces/_ver3-n_3_5_03_001/_ver3/_32cnvt/_prj/zdbserv/zdbserv.cbp" />
<Project filename="../../../../mnt/_workspaces/_ver3-n_3_5_03_001/_ver3/_32cnvt/_prj/htm_work/htm_work.cbp" />
<Project filename="../../../../mnt/_workspaces/_ver3-n_3_5_03_001/_ver3/_32cnvt/_prj/htm_term/htm_term.cbp" />
<Project filename="../../../../mnt/_workspaces/_ver3-n_3_5_03_001/_ver3/_32cnvt/_prj/smsrecvd/smsrecvd.cbp" />
</Workspace>
</CodeBlocks_workspace_file>
Could it be possible to change this behavior so that CB under Linux is writing relative paths too?
Nobody who could help me with this item?
Bump :lol:
Nobody? Really? Oh please, could sombody help me here?
also on linux you have relative paths, look at your workspace : ../../.. and so on.
Ahh! Thanks for your reply!
Yes, they ARE relative, you're right. But start of the path is ../../../../mnt/_workspaces/_ver3-n_3_5_03_001/_ver3/_32cnvt/_prj instead of _prj.
That is my problem, I can't use the same workspace file in WINDOWS and LINUX this way.
Ijust give it a short try, for a project residing on a vfat-partition, that I have mounted in a directory in winxp and mounted "normally" in linux.
I have got the exactly same workspaces for windows and linux, except for the filepath-seperators (slash on linux and backslash on windows).
The difference is, that my linux is a "real" (standalone) linux and not colinux.
I don't know if that can cause the problems.
Hi there! I experience this problem as well.
It happens when I create my workspace in, say, /home/username/workspace_dir/. Let's say that my workspace contains the following projects:
/home/username/workspace_dir/proj1.cbp,
/home/username/workspace_dir/proj2.cbp.
Then however I decide that I use this workspace rather often and I make a symbolic link like so: ln -s /home/username/workspace_dir/ home/username/Desktop/workspace_dir, so that I don't have to go running through my all directories every time I want to access it.
However, Code::Blocks does not seem to get this and instead of simple entries like proj1.cbp and proj2.cbp, the workspace will now contain ../workspace_dir/proj1.cbp and ../workspace_dir/proj2.cbp.
Btw. – jomeggs, if this applies to you as well, you may work around this by creating a launcher (e.g. nautilus /home/username/workspace_dir/) instead of a symlink; that should help – at least until this behaviour gets fixed. :)
With symlinks you will run into trouble in debug mode.
See here (http://forums.next.codeblocks.org/index.php/topic,7751.msg58345.html#msg58345) and the following posts, I posted a possible solution in the same thread.
Ah, you are right, that did happen from time to time as well... I never figured it was related. XD