News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Help with Mac version of Code Blocks

Started by ajonesma, May 19, 2010, 06:31:35 PM

Previous topic - Next topic

ajonesma

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?

afb

Which file fails to be found ? What does the error say ?

ajonesma

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]

kencamargo

Quote from: ajonesma 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.

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.

afb

Rename the program, to avoid a lot of problems it should not have spaces.