Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: DoMeN on October 30, 2006, 02:31:10 pm
-
I want to put output executable file name in Parameters text box in edit tool menu and I tried out all variable names that I found that I thought that would do the trick but unfortunately none of them sim to work :( I'm not sure if I missed one of the variables or if this is even possible at the moment. I'm using Linux FC5 and I'm not using latest night builds.
-
you can use the Tools Menu and pass the macros
$(TARGET_OUTPUT_DIR)
$(TARGET_OUTPUT_FILE)
e.g.
Executable: usr/bin/Simulatorxy
Parameters: flags, $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_FILE)
you need to activate the target in order to get the filename
-
you need to activate the target in order to get the filename
What do you mean by that? I compile the project and if I write the filename directly in the parameters field it works but if I write $(TARGET_OUTPUT_FILE) instead then it doesn't work. It seems as if this variable would return an empty string.
-
if I write $(TARGET_OUTPUT_FILE) instead then it doesn't work
Try $([your_target_name]_OUTPUT_FILE) replacing [your_target_name] with, err, your target's name (title, e.g. default).
-
you need to activate the target in order to get the filename
What do you mean by that?
use Menu Build -> Select target ... -> choose your target
or
use the "Build target" dopdown list and select (==activate) your target
-
Tnx. That works now but now I have a new problem :?. When I use $(RELEASE_OUTPUT_FILE) I get the name of output file which is ok. But when I use $(RELEASE_OUTPUT_DIR) I get the path to project file directory and not the path to the sub directory where the release file is. In menu "Project/target options" I wrote in the "output filename" text box the name of the executable and in the "Execution working dir" text box I wrote ./path_to_the_executable.
If I also write the path to the executable in the output filename then I have a problem that I can use the path only for the executable and not also for other files that need that path.
I'd really need the whole path to the executable in the tool "working directory" text box or a variable with the path to the sub folder but without the executable file name.