Important: Please read the Qt Code of Conduct -

SSE4 Compilation

  • Hello,

    I need to compile my program using either AVX or SSE4 instructions for a library I am using (dlib).
    I want my program to run on different computers so I would prefer to use SSE4 since its more general (some computers don't have AVX).

    I am not sure exactly what each line does but with these instructions my program was running well:


    I guess "-mavx" was to enable AVX instructions. However, I want to use SSE4 instructions but I can't make it work. What should I do ?

    I am using mingw 32 bit on Windows 10.

    Thank you so much,


  • Lifetime Qt Champion


    Isn't the -msseXXXwhat you are looking for ? See here.

  • Yes, I guess I should use -msse4. It just that when I try that my program crashes. But I think that it comes from one of my library. I just thought that I did something wrong. Thanks again.


  • Lifetime Qt Champion

    Then you should check exactly what parameters were used to build that library.

Log in to reply