Author Topic: Cannot run "Hello World"!  (Read 5022 times)

Offline Sugoi48

  • Single posting newcomer
  • *
  • Posts: 3
Cannot run "Hello World"!
« on: November 15, 2010, 06:07:39 am »
I recently installed Code::Blocks and was looking forwards to using it, but when I tried to run my code (whether valid or not) I encountered status 127. I tried this with the first four default compilers, same results. Any ideas? Thank you!

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Cannot run "Hello World"!
« Reply #1 on: November 15, 2010, 06:24:21 am »
I recently installed Code::Blocks and was looking forwards to using it, but when I tried to run my code (whether valid or not) I encountered status 127. I tried this with the first four default compilers, same results. Any ideas? Thank you!

No information in your post!!!

You said:
Quote
I tried to run my code

How did you do this?
What is the exact steps.
Your OS? Version? Compiler?

You should describe all the them, other wise we can't help you.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Cannot run "Hello World"!
« Reply #2 on: November 15, 2010, 07:37:22 am »
If you are on linux, this error occurs if you do not have xterm installed.

Offline Sugoi48

  • Single posting newcomer
  • *
  • Posts: 3
Re: Cannot run "Hello World"!
« Reply #3 on: November 16, 2010, 01:49:24 am »
Oops! I'm on Ubuntu 10.04 64 bit, on a MacBook Pro 5,3. I checked, and I have xterm installed.
Console App, C++, GNU GCC Compiler, type any code, Build and run, status 127.

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: Cannot run "Hello World"!
« Reply #4 on: November 16, 2010, 06:13:42 am »
If you don't have "g++", the problem caused:
Code
Compiling: /home/basta/Programs/HelloCodeBlocks.cpp
/bin/sh: g++: not found
Process terminated with status 127 (0 minutes, 0 seconds)
0 errors, 0 warnings
Could you show your Build log?
Regards,
xunxun

Offline Sugoi48

  • Single posting newcomer
  • *
  • Posts: 3
Re: Cannot run "Hello World"!
« Reply #5 on: November 16, 2010, 05:37:34 pm »
Ok. This is is messed: Today, I do exactly the same thing, intending to give you guys a copy of the build log, but this time it works exactly as expected.  :o :D Thank you for your help!