Author Topic: Help with Mac version of Code Blocks  (Read 4234 times)

Offline ajonesma

  • Single posting newcomer
  • *
  • Posts: 2
Help with Mac version of Code Blocks
« on: May 19, 2010, 06:31:35 pm »
I am a new user to code blocks and I am using it for my C++ class I am taking. I have a Mac (OS X 10.6.3) and I downloaded the second version of the code blocks for mac on the binary download page. It installed fine, the only thing is when I go to build and run it, all that happens is the terminal opens up and says it cannot find the file. Does anybody know why? and what I can do to fix this?

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Help with Mac version of Code Blocks
« Reply #1 on: May 20, 2010, 04:53:23 pm »
Which file fails to be found ? What does the error say ?

Offline ajonesma

  • Single posting newcomer
  • *
  • Posts: 2
Re: Help with Mac version of Code Blocks
« Reply #2 on: May 20, 2010, 07:27:55 pm »
Ive attached a screenshot of the error....but also when I click on the "Build and Run" button it does nothing. But if i simply click on the run button it will give me that error.

[attachment deleted by admin]

Offline kencamargo

  • Multiple posting newcomer
  • *
  • Posts: 110
Re: Help with Mac version of Code Blocks
« Reply #3 on: May 20, 2010, 11:32:45 pm »
Ive attached a screenshot of the error....but also when I click on the "Build and Run" button it does nothing. But if i simply click on the run button it will give me that error.

I know nothing about Macs, but as a Linux user I can tell you that running "hello world" off a prompt under bash will fail for two reasons:
a) The command line processor will parse it as two items, as you can see by the error you got, which mentions only the "hello" bit - you should have typed something like hello\ world so that bash knows here is an embedded whitespace in the file name;
b) you have to specify a full path, and not just the file name. Assuming there is an executable file called "hello world" in the current directory, in order to invoke it you should use ./hello\ world

In any event, this is not a code::blocks issue, you should take a look at how to compile and run programs under your OS regardless of the IDE first.

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: Help with Mac version of Code Blocks
« Reply #4 on: May 21, 2010, 08:27:57 am »
Rename the program, to avoid a lot of problems it should not have spaces.