【发布时间】:2012-03-16 22:20:08
【问题描述】:
我有这个 c++ 代码:
#include <iostream>
using namespace std;
int main () {
char chr[] = "111111111111";
int pop = 9999;
cout << chr << (pop+1) << endl;
}
当我在 shell(64 位 linux)g++ -S hello.cpp 中做时,我得到了汇编代码:
当我在上面使用nasm hello.s 时,它说它包含很多错误,例如:
instruction needed
expression syntax error
symbol `popq' redefined
也许是因为它是 64 位的?如何编译我用 g++ 创建的 .s?
【问题讨论】: