相关疑难解决方法(0)

MacOSX上的g ++不能与-arch ppc64一起使用

我正在尝试使用g ++在MacOSX上构建通用二进制文件.但是,它并没有真正起作用.我试过这个简单的虚拟代码:

#include <iostream>
using namespace std;
int main() {
    cout << "Hello" << endl;
}
Run Code Online (Sandbox Code Playgroud)

这很好用:

% g++ test.cpp -arch i386 -arch ppc -arch x86_64 -o test
% file test
test: Mach-O universal binary with 3 architectures
test (for architecture i386):   Mach-O executable i386
test (for architecture ppc7400):    Mach-O executable ppc
test (for architecture x86_64): Mach-O 64-bit executable x86_64
Run Code Online (Sandbox Code Playgroud)

但是,这不是:

% g++ test.cpp -arch i386 -arch ppc -arch x86_64 -arch ppc64 -o test
In file included from test.cpp:1:
/usr/include/c++/4.2.1/iostream:44:28: …
Run Code Online (Sandbox Code Playgroud)

macos g++ universal-binary

5
推荐指数
1
解决办法
4026
查看次数

标签 统计

g++ ×1

macos ×1

universal-binary ×1