Code::Blocks Forums

User forums => Help => Topic started by: vayolet on April 08, 2016, 11:56:19 am

Title: Compile failure that looked successful
Post by: vayolet on April 08, 2016, 11:56:19 am
I spent all day yesterday trying to debug my code because it was failing with an old error that I though I had fixed.
I would click in compile and run, which showed me the terminal with my program running and failing. Then the debugger would give me any kind of weird errors that I didn't really understand why they were happening. It turned out that the compilation of my program had failed but 1) the messages with the errors are blue/grey (instead of the bright red errors that other features use), so I didn't bother to read them because 2) the terminal opened and showed me my program being executed (but it was actually an old version of my code).

I thought it was Codeblocks being a bit ambiguous, but I've tried now build+run, and it has failed to open the terminal and everything, which I would think it's the expected behaviour when failing.
Title: Re: Compile failure that looked successful
Post by: oBFusCATed on April 08, 2016, 06:36:19 pm
What version of cb, compiler and os are you using?
Can you give us example project that causes cb to fail to detect the errors?
Title: Re: Compile failure that looked successful
Post by: vayolet on April 11, 2016, 11:00:24 am
I tried to reproduce it but I haven't been able to yet. The error was that I had on my project files that didn't exist any more.

I'm on Debian Jessie, Codeblocks svn 10794, gcc 4.9.2
Title: Re: Compile failure that looked successful
Post by: stahta01 on April 13, 2016, 10:33:23 pm
I always use re-build on this type of error instead of build; saves a lot of extra work that finds nothing in most cases.

FYI: If you are using an PCH file delete it; PCH means precompiled header.

Edit: Also, look at the build log instead of build messages for the cause/problem.

Tim S.