编译带有SSE指令的程序时,请使用以下选项,
g++ -Wall -march=pentium4 -mmmx -o a.out a.cpp
否则就会出现如下类似错误:
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/xmmintrin.h:34:3: error: #error "SSE instruction set not enabled"
如果是多线程程序,还要加上-lpthread选项
编译带有SSE指令的程序时,请使用以下选项,
g++ -Wall -march=pentium4 -mmmx -o a.out a.cpp
否则就会出现如下类似错误:
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/xmmintrin.h:34:3: error: #error "SSE instruction set not enabled"
如果是多线程程序,还要加上-lpthread选项