Program:
#include <thread>
int main(void)
{
std::thread t;
return 0;
}
test.cpp: In function ‘int main()’:
test.cpp:6:5: error: ‘thread’ is not a member of ‘std’
std::thread t;
^~~
GCC info:
$ g++ test.cpp -H
. /home/nathan/development/toolchain/gnu/x86_64-unknown-linux-gnu/include/c++/6.2.0/thread
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/nathan/development/toolchain/gnu/x86_64-unknown-linux-gnu/libexec/gcc/x86_64-pc-linux-gnu/6.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/home/nathan/development/toolchain/gnu/x86_64-unknown-linux-gnu --enable-languages=c,c++,fortran --disable-multilib
Thread model: posix
gcc version 6.2.0 (GCC)
Using other parts of STL work just fine, it is only thread
that fails. Am I missing something? When configured, GCC picks up the threading model. Do I still need to pass --enable-threads
when building?
Aucun commentaire:
Enregistrer un commentaire