Bug #12193 2007-10-17 08:47
christobal
Code::Blocks ${TARGET_*} Macros empty after project change
After changing from one workspace project to another, the Code::Blocks ${TARGET_*} Macros (like ${TARGET_OUTPUT_DIR}) are empty.
They keep being empty even if the build target is switched to another one.
- Category
- Application::Error
- Group
- Status
- Closed
- Close date
- 2007-11-15 12:37
- Assigned to
History
See bug #011665 for details.
If you are still having problems then try Patch #2234
Unfortunatly, this didn't solve the problem.
(win32 CB Revision 4600 + patch #2234)
The Build process results now in the correct output files, but the macros can still be "messed up".
Maybe you can reproduce it with a little example:
- Create 2 projects (let's say P1 and P2)
- define for each project 2 build targets ("release" and "debug")
- make P1 "release" target active
- make P2 "debug" target active
- save workspace and reopen code::blocks
-> now P2 is active and the "Build Target ComboBox" says "debug";
${TARGET_NAME} is "debug" as well.
- activate project P1
-> the ComboBox still says "debug" but ${TARGET_NAME} is "result"
- this could be solved by selecting in the ComboBox -> "result" and then "debug" again, but we don't do this ;-)
- instead, we select in the ComboBox "debug" again
-> Now the ${TARGET_NAME} is locked to "result" and won't change,
no matter how often we try to switch project and targets
-> We have to restart Code::Blocks to unlock ${TARGET_NAME}
I gues that this behaviour is the same for all ${TARGET_*} macros, but I tested just ${TARGET_NAME} and ${TARGET_OUTPUT_FILE}
Unfortunately I was not able to reproduce this problem... Maybe I am doing something wrong... Can you send me this workspace with two projects to pauliusz(at)yahoo.com
Thanks christobal for good reports. Looks like I have fixed this bug completely. Would be very nice if you could test updated patch once more.
This bug is now fixed in HEAD.
Thank you for reporting it.