Search code examples
c++qtstdthreadappveyor

Using std::thread in AppVeyor with Qt


I'm trying to use AppVeyor for a C++ program made using Qt. My appveyor.yml only do the 3 following things:

    - cd Project
    - qmake Project.pro
    - mingw32-make

But when AppVeyor is trying to compile my project it tells me

    error: 'thread' is not a member of 'std'

I'm sure the problem isn't from my code because it works on my computer or when using Travis CI

I'm also putting a link to the CI just in case: https://ci.appveyor.com/project/Xwilarg/programmanager/builds/23421335

Would someone please know how I can use std::thread in AppVeyor ?


Solution

  • I finally found the answer of my question.

    As Shloim said, I had to use https://github.com/meganz/mingw-std-threads

    Then my CI wasn't able to find GetNativeSystemInfo so I had to add -D _WIN32_WINNT=0x0501 in the compile flags