I'm trying to compile and run my code migrated from Unix to windows. My code is pure C++ and not using Qt classes. it is fine in Unix.
I'm also using Qt creator as an IDE and qmake.exe
with -spec win32-g++
for compiling. As I have sse
instructions within my code, I have to include emmintrin.h
header.
I added:
QMAKE_FLAGS_RELEASE += -O3 -msse4.1 -mssse3 -msse3 -msse2 -msse
QMAKE_CXXFLAGS_RELEASE += -O3 -msse4.1 -mssse3 -msse3 -msse2 -msse
In the .pro
file. I have been able to compile my code without errors. but after running it gives run-time error while going through some functions containing __m128
or like that.
When I open emmintrin.h
, I see:
#ifndef __SSE2__
# error "SSE2 instruction set not enabled"
#else
and It is undefined after #else
.
I don't know how to enable SSE
in my computer.
Platform: Windows Vista
System type: 64-bit
Processor: intel(R) Core(TM) i5-2430M CPU @ 2.40Hz
Does anyone know the solution?
Thanks in advance.