天天看点

linux GCC编译错误:CPU you selected does not support x86-64 instruction set

Linux GCC编译时如遇到如下错误:

cpp:1: error: CPU you selected does not support x86-64 instruction set

是因为在64位平台上加了-march=pentium4这样一个编译参数,它只用于32位平台。