User forums > Using Code::Blocks
Slash symbol in custom variable
Dvorkin:
May be.
Do the switch, please, because it seems to be very useful.
oBFusCATed:
Can you post the envvar tags from your default.conf file, so I can take a look?
The conf file is in %APPDATA%/Codeblocks/default.conf.
The tag to search for is <envvars>.
Copy and paste it here using quote or code tags (# button).
Dvorkin:
%APPDATA%/Codeblocks/default.conf contains global environment, Settings->Environment->Environment Variables. This works fine, there is not incorrect slash modification.
The problem is in Project->Build options->Custom Variable.
It's from project .cbp file(I've deleted extra info about targets Release and Debug):
--- Code: --- <Build>
<Environment>
<Variable name="REMOTE_DIR" value="/mnt/gdb/bin" />
</Environment>
</Build>
--- End code ---
Exactly this variable, REMOTE_DIR from Project->Build options->Custom Variable has incorrect behavior.
//---------------------------------------------------------------------------------------------------------
And now from %APPDATA%/Codeblocks/default.conf (but, again, there is not problem):
--- Code: --- <envvars>
<sets>
<default>
<ENVVAR0>
<str>
<![CDATA[1|REMOTE_IP|192.168.1.10]]>
</str>
</ENVVAR0>
<ENVVAR1>
<str>
<![CDATA[1|REMOTE_USER|root]]>
</str>
</ENVVAR1>
<ENVVAR2>
<str>
<![CDATA[1|REMOTE_PASSWORD|root]]>
</str>
</ENVVAR2>
<ENVVAR3>
<str>
<![CDATA[1|REMOTE_DIR|/mnt/app/bin]]>
</str>
</ENVVAR3>
</default>
</sets>
<ACTIVE_SET>
<str>
<![CDATA[default]]>
</str>
</ACTIVE_SET>
<DEBUG_LOG bool="0" />
</envvars>
--- End code ---
oBFusCATed:
Is it a problem if you start using envvars for this task as a workaround?
The added benefit is that the settings won't be stored in the project, so they can be different for every dev on your team.
Dvorkin:
Using of the project env vars is not a workaround. The variable REMOTE_DIR is using for copying output file to remote system, and for starting GDB server on remote system. Every project has it's own directory at remote system, so every project has it's own env var REMOTE_DIR. It defined in Project->Build options->Custom Variable.
Navigation
[0] Message Index
[*] Previous page
Go to full version