8 Replies - 2548 Views - Last Post: 05 December 2013 - 11:27 PM Rate Topic: -----

#1 Kingnahum17  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 8
  • Joined: 05-December 13

Process terminated with Status 1?

Posted 05 December 2013 - 09:23 PM

I'm brand new to C++ (as in on page 24 of C++ All-In-One for Dummies), and have already run into a problem that Google has come up short on. I'm thinking it may be compiler problems. I'm using Code::Blocks.

Here are some images of my screen, one when I build and the other when I run it. You can see the error message in the first picture that says "Process terminated with status 1." Earlier I got a message that said "Process terminated with status Status -1073741510". Bother error messages after I did ctrl+F9.
Attached Image
Attached Image

Here's the code. I already have 0 errors and 0 warnings, but just in case.

#include <iostream>

using namespace std;

int main()
{   cout << "Hello! I am your computer talking." << endl;
    cout << 5 + 10 << endl;
    return 0;
}

This post has been edited by GunnerInc: 05 December 2013 - 10:01 PM
Reason for edit:: Uploaded and inlined images


Is This A Good Question/Topic? 0
  • +

Replies To: Process terminated with Status 1?

#2 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 5925
  • View blog
  • Posts: 20,255
  • Joined: 05-May 12

Re: Process terminated with Status 1?

Posted 05 December 2013 - 09:41 PM

I'm confused. Your second picture shows a successful run and a return code of 0.
Was This Post Helpful? 0
  • +
  • -

#3 Kingnahum17  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 8
  • Joined: 05-December 13

Re: Process terminated with Status 1?

Posted 05 December 2013 - 09:45 PM

View PostSkydiver, on 05 December 2013 - 09:41 PM, said:

I'm confused. Your second picture shows a successful run and a return code of 0.


If you look at the second picture closely, I'm telling it to add 10 and 5 but when I run it, it does not add it. In the first picture you'll see bright red letter in the build log that I assume have something to do with the problem.
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 5925
  • View blog
  • Posts: 20,255
  • Joined: 05-May 12

Re: Process terminated with Status 1?

Posted 05 December 2013 - 10:10 PM

That first picture hints at the linker may have failed.

What toolchain are you using: GCC? Borland? Intel?

Out of curiosity... why are using using Code::Block 8? They are all the way up to version 12 now.
Was This Post Helpful? 0
  • +
  • -

#5 Kingnahum17  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 8
  • Joined: 05-December 13

Re: Process terminated with Status 1?

Posted 05 December 2013 - 10:18 PM

View PostSkydiver, on 05 December 2013 - 10:10 PM, said:

That first picture hints at the linker may have failed.

What toolchain are you using: GCC? Borland? Intel?

Out of curiosity... why are using using Code::Block 8? They are all the way up to version 12 now.


How would I fix the "linker"?

Also, I am using GNU GCC. The reason I am using 8, is because it is what came with the book and I figured it may be easier to follow along if I use what they used. Although if I'm going to have problems caused by the program I have no problem in updating it.
Was This Post Helpful? 0
  • +
  • -

#6 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 5925
  • View blog
  • Posts: 20,255
  • Joined: 05-May 12

Re: Process terminated with Status 1?

Posted 05 December 2013 - 10:26 PM

Typically, you don't need to fix the linker. You need to find out what failure the linker ran into. Unfortunately, that build log doesn't really tell us what failed. I'm not familiar enough with Code::Blocks to tell you how to get more verbose build output. Hopefully the more verbose output will tell us what is failing. (If I were to guess, you program may still have been running and the linker was trying to create a new version.)

As for the 15 not being printed out as the second line: was line 7 always part of your program? Or was it something that added recently? If the latter, the failed link would explain why you still have an old executable that doesn't have the code to output the 15.

So the quick thing to try is do a reboot, then go back into Code::Block and select Build.Clean, and then after that Build.Run.
Was This Post Helpful? 0
  • +
  • -

#7 Kingnahum17  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 8
  • Joined: 05-December 13

Re: Process terminated with Status 1?

Posted 05 December 2013 - 10:41 PM

View PostSkydiver, on 05 December 2013 - 10:26 PM, said:

Typically, you don't need to fix the linker. You need to find out what failure the linker ran into. Unfortunately, that build log doesn't really tell us what failed. I'm not familiar enough with Code::Blocks to tell you how to get more verbose build output. Hopefully the more verbose output will tell us what is failing. (If I were to guess, you program may still have been running and the linker was trying to create a new version.)

As for the 15 not being printed out as the second line: was line 7 always part of your program? Or was it something that added recently? If the latter, the failed link would explain why you still have an old executable that doesn't have the code to output the 15.

So the quick thing to try is do a reboot, then go back into Code::Block and select Build.Clean, and then after that Build.Run.


I just rebooted multiple times and no dice. Everything happened just the same as before. Same outcomes and error messages, as well as still lacking the "15" that should be in it when it's run.

I'll update everything and try to reinstall my compiler.
Was This Post Helpful? 0
  • +
  • -

#8 Kingnahum17  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 8
  • Joined: 05-December 13

Re: Process terminated with Status 1?

Posted 05 December 2013 - 11:06 PM

View PostKingnahum17, on 05 December 2013 - 10:41 PM, said:

View PostSkydiver, on 05 December 2013 - 10:26 PM, said:

Typically, you don't need to fix the linker. You need to find out what failure the linker ran into. Unfortunately, that build log doesn't really tell us what failed. I'm not familiar enough with Code::Blocks to tell you how to get more verbose build output. Hopefully the more verbose output will tell us what is failing. (If I were to guess, you program may still have been running and the linker was trying to create a new version.)

As for the 15 not being printed out as the second line: was line 7 always part of your program? Or was it something that added recently? If the latter, the failed link would explain why you still have an old executable that doesn't have the code to output the 15.

So the quick thing to try is do a reboot, then go back into Code::Block and select Build.Clean, and then after that Build.Run.


I just rebooted multiple times and no dice. Everything happened just the same as before. Same outcomes and error messages, as well as still lacking the "15" that should be in it when it's run.

I'll update everything and try to reinstall my compiler.


Now that I updated Code:Blocks to version 12.11 which also includes the GCC compiler, it works just fine.

Thanks for replying and helping me out.
Was This Post Helpful? 0
  • +
  • -

#9 Kingnahum17  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 8
  • Joined: 05-December 13

Re: Process terminated with Status 1?

Posted 05 December 2013 - 11:27 PM

I'm sorry if multiple postings in a row are frowned upon here, but I can't figure out how to "edit" my posts.

I figured out what "Status 1" was. It's basically telling you that after running your code, you didn't "Press Any Key to Continue", and instead you used the "X" button. It's that easy.

I really hope this helps out people is the far future because I couldn't even find this answer (even though it's incredibly easy to figure out) on Google.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1