So I was trying to compile some code (Bullet Physics demos to be specific), and an error came up that said SSE and SSE2 were not enabled. I checked the compiler flags in Code::Blocks, and SSE/SSE2 were not on there. I tried to put the flags in "other options" instead (-msse, -msse2) and that did not work.
Then I saw a post here on stackoverflow that said to try "-march=native", which I did. That did not work either.
I am using G++ (MinGW) to compile, and I am on Windows 7 x64.
If it means anything, the project is using a custom makefile.
To make this work, you need to have march
set to something that supports SSE2 (say, Pentium4 or Core2, in your case "native" might also do since you're running on x86_64, but I've never used "native") and enable SSE2 via -msse2
.
But: Since you use a custom makefile, you must do this in your makefile or you must use environment variables (forget environment vars, I just looked, and it seems you can control pretty much everything via these, except target/optimization options).
Code::Blocks sets compiler options when you compile from a project file, but not when using a custom makefile. With a custom makefile, it is assumed that you know what you're doing and that the makefile "works correctly".
Worded differently, you can set any options you like, they won't have any effect as long as you use a cutom makefile.