Eclipse CDT - No Console Output on OSX

434 Views Asked by At

New to the C++ world and wanted to fiddle around using Eclipse's IDE for C/C++ called CDT. I am on OSX 10.10.2 using eclipse-cpp-luna-SR2-macosx-cocoa-x86_64.

Sadly this simple example is not printing anything in the eclipse terminal.

#include <iostream>

using namespace std;

int main() {
    cout <<  "Hello World" << endl;

    return 0;
}

I suspect the problems are caused by me running a 64bit architecture and the program being compiled with 32bit ? I can't run the compiled executable with the error cannot execute binary file.

1

There are 1 best solutions below

0
On BEST ANSWER

Are you using the right compiler? If you are compiling with Cross GCC it might not run on a 64bit OS X device. Try using MacOS GCC for compiling if so.