Reputation: 192
I have just begun using the newly released EAP build of CLion by JetBrains, and the whole thing runs on CMake. I wrote the CMake script correctly, I think, because all the libraries are included and no errors are thrown up on that front.
But the code uses the std::thread libraries, and I am getting errors on compilation as follows:
std::thread has not been declared.
A whole host of related errors follow from here. I specified in CMakeList according to several stackoverflow posts to use C++ 11 compiler as follows:
add_compile_options(-std=c++0x)
And I have included the thread.h
header as well. This seems to be having no effect on compilation, and is happily frustrating me with the same damn errors over and over again.
Help would be greatly appreciated.
Upvotes: 2
Views: 6474
Reputation: 11
" CLion only works on MinGW. MinGW doesn't support a lot of stuff like std::thread and std::to_string. Only Mingw-w64 does and that's not supported currently by CLion. – Rapptz Sep 12 at 10:45 "
This comment couldn't be further from the truth...
If you go to Jetbrains site and view the eap version info, or better yet go to their dev blog they address a lot of questions like this.
Upvotes: 1
Reputation: 1937
It's not possible with MinGWx32. And MinGWx64 is not currently supported (http://youtrack.jetbrains.com/issue/CPP-668). You can use Cygwin instead. Select it in Settings | Build, Execution, Deployment | Toolchain.
Upvotes: 1