User forums > Using Code::Blocks
Auto Rebuild Not Working
Dalmango:
Codeblocks was fine for a few weeks but I'm now having to rebuild the entire project in order for code to run.
Build & Run no longer properly builds, it just runs the last settings.
I'm currently studying tutorials online, & keeping notes as separate progs. I right-click the files properties in the projects window &turn off the compile & link (not on target, only the main options at top). This workflow has been working fine for 50 tutorials or so up until this morning. The build is returning no errors.
I uninstalled Codeblocks via the windows control panel & have reinstalled a newer version several times.
BlueHazzard:
Have you tried Build->Rebuild
Are you sure you use the right target (from the drop down, near the build button)
What does the Build log say?
Dalmango:
Thanks BlueHazzard,
--- Quote from: BlueHazzard on May 04, 2020, 11:29:35 am ---Have you tried Build->Rebuild
--- End quote ---
Yes as stated in OP this enables the update of my changes to which files are built.
--- Quote from: BlueHazzard on May 04, 2020, 11:29:35 am ---Are you sure you use the right target (from the drop down, near the build button)
--- End quote ---
The blue cyclical arrows "Rebuild" - this refreshes the files & ensures that my changes which have been updated as to build them or not.
--- Quote from: BlueHazzard on May 04, 2020, 11:29:35 am ---What does the Build log say?
--- End quote ---
No errors, the build logs are showing a lot of different default paths; compilers & the like, but no errors.
I would guess that build & run needs another setting ticked. It doesn't seem to be building/ updating the linker to my most recent changes which have been made in the projects panel.
EDIT1 - If I make changes to the file then these changes are reflected in my built & run file (provided that file was the last to have it's "compile" & "link" properties ticked in the Projects pane window.
However - once I've finished editing that file, turn the compile & link properties off on that file. Go to another file & turn it's compile & link options to selected. That file will not be built or linked. I will see the old file in the output.
If i hit rebuild then my most recent file will be built/ linked.
EDIT2 - Noticed in virtual folders when selecting rename the automatically generated filename text (to rename) is ending with a \ character. I wonder if there's a bug that's adding these after the file has been created/ renamed.
If you try to save the virtual folder again then it warns you that you can't have a backslash in the filename; this is clearly a bug.
BlueHazzard:
So your exact steps are:
1) Start codeblocks
2) Open a project
3) Select one file, tick "compile" and "link" in File->Properties->Build
4) Build the file with the yellow button in the tool bar
5) Run the file with green arrow
6) All works
7) Remove the tick in "compile" and "link" in File->Properties->Build
8) Open a other fiel
9) set there the ticks in "compile" and "link" in File->Properties->Build
10) Build with the yellow buttin
11) Hit the run button
12) The old executable is run
Are this steps correct? If not, can you please describe your process with as many steps as possible?
Also it would be nice if you could add a build log for every build you make. Please add them in code tags (# symbol int the new post editor) And please post them from the "Build Log" tab and not from the "Build messages" tab
BlueHazzard:
Also please state what your intention is, why you enable single files to build via the "compile" and "link" in File->Properties->Build option. This is quite an unusual way to do things...
Navigation
[0] Message Index
[#] Next page
Go to full version