[英]Eclipse CDT - No Console Output on OSX
New to the C++ world and wanted to fiddle around using Eclipse's IDE for C/C++ called CDT.刚接触 C++ 世界,想尝试使用 Eclipse 的 C/C++ IDE 称为 CDT。 I am on OSX 10.10.2 using eclipse-cpp-luna-SR2-macosx-cocoa-x86_64 .
我在OSX 10.10.2 上使用eclipse-cpp-luna-SR2-macosx-cocoa-x86_64 。
Sadly this simple example is not printing anything in the eclipse terminal.遗憾的是,这个简单的例子没有在 eclipse 终端中打印任何内容。
#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 ?我怀疑问题是由我运行 64 位体系结构和使用 32 位编译的程序引起的? 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.
如果您使用 Cross GCC 进行编译,它可能无法在 64 位 OS X 设备上运行。 Try using MacOS GCC for compiling if so.
如果是这样,请尝试使用 MacOS GCC 进行编译。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.