Author Topic: Code is not running when run, but running fine in the debug mode  (Read 4105 times)

e-nnovation

  • Guest
Hi Everyone,

When I run my code, it is giving the following error
Process terminated with status -1073741510

But when I set the breakpoint at the last statement of the main function, I am able to see the expected output.
Am new to code blocks. So any info in this regard would be great.

Thank you in advance.

Details that you may require:
1. code is completely written in c (only one source file, main.c)
2. am running code blocks 8.02 on vista.
3. used gnu gcc compiler

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7739
    • My Best Post
Re: Code is not running when run, but running fine in the debug mode
« Reply #1 on: March 07, 2010, 11:32:41 pm »
Best guess; upgrade the compiler if the compiler was the one packaged with Code::Blocks 8.02.

If not, please state compiler version.

The command gcc -v
Code
gcc -v

Gives the last one of this below. Many lines in front of this line.
Code
gcc version 3.4.5 (mingw-vista special r3)

Note: (mingw-vista special r2) did NOT work well under Vista.

Edit: The normal answer for your question "work in debug; not in release" is that the code is likely wrong.
Normally, the cause is failure to initial a variable; but, with large code project the cause can be many things. But, running the old MinGW GCC under Vista has given different results for different users/computers; so, I said that first.

Tim S.
« Last Edit: March 07, 2010, 11:39:08 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org