Bug #11665 2007-07-30 17:20
mariocupelli
Compiler uses wrong project information
The compiler plugin does not use consistent project information.
You can use two ways to reproduce the bug (see the attachment of
http://forums.codeblocks.org/index.php/topic,6556.0.html)
- Unpack the attached file
- Close all project in the workspace and restart CB
- The workspace should be empty
- Open the project HelloSerial
- Output the target output directory (cmd /c ${TARGET_OUTPUT_FILE}) (this should be correct)
- Open the second project HelloSerInt
- Output the target output directory (cmd /c ${TARGET_OUTPUT_FILE}) (this is empty)
Another possibility is using different projects that use postbuild steps.
project1 contains postbuild:
objcopy -O binary $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_FILE).bin
and project 2 contains the same post build step.
If you compile the workspace containing two or more projects then even after a rebuild the second project will use the project information of project1 for TARGET_OUTPUT_FILE.
- Category
- Compiler
- Group
- Status
- Closed
- Close date
- 2007-11-15 12:37
- Assigned to
History
If I open HelloSerial and execute cmd /c ${TARGET_OUTPUT_FILE}, I get the correct information and the corresponding layout-file contains the correct ActiveTarget name="ROM" entry. If I open the next project HelloSerInt and execute cmd /c ${TARGET_OUTPUT_FILE} it will return an empty string. In the layout file of HelloSerInt the ActiveTarget name is also empty. If I edit the layout file manually and set the ActiveTarget name="ROM" then everything will work fine. So perhaps this gives you a hint of how to fix the bug. The only way to get then a correct ActiveTarget is to restart CB and open only this project (e.g. HelloSerInt).
Patch #2234 should fix even workspace rebuild
This bug is now fixed in HEAD.
Thank you for reporting it.