Author Topic: [SOLVED] Build and Run not working?  (Read 18216 times)

Offline Drakon

  • Multiple posting newcomer
  • *
  • Posts: 10
[SOLVED] Build and Run not working?
« on: November 27, 2013, 08:18:35 am »
Every time I want to check if my program is updating after I change something, however I click Build and Run, and it just runs the old version, I have to keep telling it to rebuild the project from scratch. This is pretty annoying, I don't remember changing any of the settings that could affect this, but if there are any settings that could do this I would love it if someone could help me with anything to get this sorted.

The headers weren't being linked for.
« Last Edit: November 27, 2013, 12:56:02 pm by Drakon »

ToApolytoXaos

  • Guest
Re: Build and Run not working?
« Reply #1 on: November 27, 2013, 08:37:58 am »
Drakon, it would be really helpful if you had provided more information please.

IDE version, compiler you use, operating system you are under while this issue happens.

Cheers.

P.S.: I had a similar issue in the past, but under Debian. I'm currently compiling code myself (both Windows and GNU / Linux) and such issue does not exist anymore.

Offline Drakon

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Build and Run not working?
« Reply #2 on: November 27, 2013, 08:45:54 am »
Sorry, it would be version 12.11. O.S. Windows XP. And the compiler just tells me it is upto date no matter how many changes I make to the file so it just runs the old version of my program, I can even put giberish non-C++ stuff and it will not detect it, I have to rebuild the project and only then it will see the changes and syntax errors.

Edit: It only seems to be this project, but when I include the files to a new project the error carries accross I can get used to it, but I would like to see if there is a fix.
« Last Edit: November 27, 2013, 09:15:07 am by Drakon »

ToApolytoXaos

  • Guest
Re: Build and Run not working?
« Reply #3 on: November 27, 2013, 09:18:49 am »
...the compiler just tells me it is upto date no matter how many changes I make to the file so it just runs the old version of my program...
This is the right behavior if you just run Build. Are you using hot keys or you do it manually using your mouse to click the proper option?

F9 is for Build and run and Ctrl-F9 for Build.

Offline Drakon

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Build and Run not working?
« Reply #4 on: November 27, 2013, 09:23:58 am »
Yeah I'm using build and run, but it is acting as if it is just run. Like i said, I can rebuild the project THEN click run and it will run the updated code, however if I click build and run it will run what ever is in there even if it has syntax errors since it doesn't check for updated code, it just sees it as the same code and all upto date.

ToApolytoXaos

  • Guest
Re: Build and Run not working?
« Reply #5 on: November 27, 2013, 10:06:58 am »
well, you could download the latest nightly build and set it in a directory without spaces, preferably C:\CodeBlocks if that's not where you have installed Code::Blocks 12.11, and test your existing project to see whether is behaves the same or not.

In case the issue gets resolved, it should be wise to uninstall 12.11 and keep working on nightly builds. I'm using it for a few years now and haven't faced any major problems thus far.

Offline Drakon

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Build and Run not working?
« Reply #6 on: November 27, 2013, 10:10:15 am »
I'll try it thanks, I hope it fixes it.

Nope same result, I am thinking it is now a project property issue but I can't see anything that is amiss.
« Last Edit: November 27, 2013, 10:18:28 am by Drakon »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build and Run not working?
« Reply #7 on: November 27, 2013, 10:31:58 am »
Read this: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Then: Change a file and hit build. Inspect the build log. C::B should have executed a command for building the file.
If it doesn't then check modification times of all source, object (.o or .obj) and output (.exe, .dll, .a) files. If they are in the future you'll get this behaviour.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Drakon

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Build and Run not working?
« Reply #8 on: November 27, 2013, 10:38:24 am »
Look at all of them checked command logging and it is still the same result.

I checked dates, they say a date in the past, which was when I rebuild it. If I say "Build and Run" it doesn't change the date whatsoever since it says it is up to date and no changes need to be made, even if I make 100 lines change.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build and Run not working?
« Reply #9 on: November 27, 2013, 11:05:11 am »
Then do a full rebuild and inspect the paths.
Are you changing the correct file for example:)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Drakon

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Build and Run not working?
« Reply #10 on: November 27, 2013, 11:12:37 am »
Nope still the same paths, still the same file that I want it to edit. This is so fustrating.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build and Run not working?
« Reply #11 on: November 27, 2013, 11:15:05 am »
Can you pastebin the cbp file for inspection?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Drakon

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Build and Run not working?
« Reply #12 on: November 27, 2013, 11:24:33 am »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Build and Run not working?
« Reply #13 on: November 27, 2013, 11:29:54 am »
Nothing unexpected. Can you post a full rebuild log?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ToApolytoXaos

  • Guest
Re: Build and Run not working?
« Reply #14 on: November 27, 2013, 11:31:37 am »
@oBFusCATed: Could it possibly be the inclusion of autoversioning? I never thought of that before.