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
 
mariocupelli 2007-10-20 22:39

See bug #011665 for details.

pauliusz 2007-11-08 01:41

If you are still having problems then try Patch #2234

christobal 2007-11-08 10:42

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}

pauliusz 2007-11-11 23:50

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

pauliusz 2007-11-13 02:35

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.

christobal 2007-11-13 09:23

I can agree.

Patch #2234 works fine on

Win32 Code::Blocks (svn build 4600)

Thanks for fixing :-).

mandrav 2007-11-15 12:37

This bug is now fixed in HEAD.

Thank you for reporting it.