User forums > Using Code::Blocks

Code::Blocks in Mac OSX, error in Terminal: "can't execute bianry file."

(1/1)

Blocks4moi:
 Help in using Code::Blocks in Mac OSX. I'm barely starting to study programming and I can't seem to be able to run my first "Hello World" program. This is my code:

#include <iostream>

using namespace std;

int main()

{

cout << "Hello World !" << endl;

}


And the Terminal says unable to execute binary file. I tried to Build and Run the code but it wouldn't. It just won't run on Mac OS. The same code builds and runs on my desk top running Code::Blocks on Ubuntu. Can anyone help me get started? I will appreciate a lot any help you can give me.

MortenMacFly:
C::B is an IDE, not a compiler. C::B supports quite a list of compiler natively (and can be easily extended). So: You not only need C::B, but also a compiler framework of your choice (which should be supported by C::B, of course). Install yourself a compiler framework!
If in doubt enable full compiler logging (see my sig) and post the FULL log that appears when you try to compile your application.

Blocks4moi:
Thanks. Yes, I had to install the gnu compiler and that fixed it.

Navigation

[0] Message Index

Go to full version