News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Compile failure that looked successful

Started by vayolet, April 08, 2016, 11:56:19 AM

Previous topic - Next topic

vayolet

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.

oBFusCATed

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?
(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!]

vayolet

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

stahta01

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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]