User forums > Using Code::Blocks
how to design the template
realmeat:
thank you very much!! :D
but I have some problem in using the variable.
If I want to set the directory by using $(CODEBLOCKS )to C:\program files\CODEBLOCKS\personal_include,
(my code::blocks program dirctory is C:\program files\CODEBLOCKS)
I set the follow :(Build Options->Directorys->compiler)
$(CODEBLOCKS)\personal_include
after the building , the compiler tell me it can't find directory / file.
$(CODEBLOCKS) == "C:\program files\CODEBLOCKS" ??
I'm confused... :?
--
By the way,
(Build Options->Custom variables)
I set the Variable $(CODE) = "c:\program files\CODEBLOCKS"
and change the path to the follow:
$(CODE)\personal_include
No error.
realmeat:
I solve this problem.
Maybe that's a bug.
$(CODEBLOCKS) == "c:\program files\codeblocks";
but in compiling, $(CODEBLOCKS) becomes "c:\program" and "file\codeblocks",two variables.
so, it search "c:\program" and "files\codeblocks\personal_include\"
It's so ridiculous.....
But I use other way to slove this.
in the custom variable
<Environment>
<Variable name="PATH" value='"$(CODEBLOCKS)"' />
</Environment>
and...
$(PATH)\personal_include
use another variable replace the default.
Maybe that's all fault because of WIN system.
thomas:
This is a bug that has been fixed many months ago, so you must be using quite an old version (probably RC2).
If you were using a more recent version, you would want to use the $(#cb.include) global user variable for that purpose, too. That will do the same thing, but won't require you to set the path again and again with every project.
Navigation
[0] Message Index
[*] Previous page
Go to full version