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 .
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.