Type 'std::thread' could not be resolved with Eclipse 4.7 (Oxygen) [message #1772012] |
Sun, 03 September 2017 17:28  |
Eclipse User |
|
|
|
Dear all,
Before anybody points me back to existing threads on the topic, I have browsed through anything Google came up with. Nothing works for now.
I have gcc/g++ version 5.4.0 installed on Ubuntu 16.0.4 LTS
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
running Eclipse Oxygen 4.7.0 Build id: 20170620-1800. I have already added "-ipthread" flag to cross G++ compiler, selected ISO C++11 language in Cross G++ compiler resulting in the compile sequence "-std=c++0x -D__GXX_EXPERIMENTAL_CXX0X__ -O3 -Wall -c -fmessage-length=0 -pthread"


I am still having problems with "std::thread" call, with the hint showing "Type 'std::thread' could not be resolved" as shown below

no matter what I do. Code compiles and executed fine, but the error is annoying ...
Thanks
Marek
Attachment: Capture1.PNG
(Size: 122.16KB, Downloaded 11344 times)
Attachment: Capture2.PNG
(Size: 103.81KB, Downloaded 10726 times)
Attachment: Capture3.PNG
(Size: 23.83KB, Downloaded 10537 times)
|
|
|
|
Re: Type 'std::thread' could not be resolved with Eclipse 4.7 (Oxygen) [message #1772138 is a reply to message #1772137] |
Tue, 05 September 2017 20:22   |
Eclipse User |
|
|
|
Thank you for the answer, David
Since I am using the latest and greatest as far as GCC / G++ is concerned (unless I am mistaken, but 5.40, 20160609 build seems to be the latest available in Ubuntu chain), I am not sure what newer versions are there out.
I did have the setting for Cross GCC compiler already, as suggested - here is the screenshot:
but after several code recompilations, nothing changes and I still have the very same issue.
I noticed though, that when I close Eclipse, restart, problem seems to go away until code is recompiled. Then it is back again :(
Marek
Attachment: Capture1.PNG
(Size: 143.23KB, Downloaded 10758 times)
[Updated on: Tue, 05 September 2017 22:26] by Moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05444 seconds