0

I am working with c++ and it got type __uint128_t in the code. The code compiles fine on g++ (GCC) 4.8.3, but Eclipse/CDT always show error on "__uint128_t". The actual error message is "Type '__uint128_t' could not be resolved".

I tried several things already, including re-index, adding -std=c++11 to compiler's setting. Does anybody know how to make the error message disappear?

I am running Eclipse Luna Release (4.4.0) and CDT 8.4.0.

Steven
  • 475
  • 4
  • 14

3 Answers3

0

Eclipse will be able to correctly "parse" this type only if it's defined in some header of your toolchain. If it is a builtin type in compiler (just like "int", "char" and so on) - and I guess it is - then Eclipse would need to have special code to handle that type. So unless someone implements handling of this token in Eclipse, your only option is to disable this particular code analysis check for the files that use this type...

Freddie Chopin
  • 8,440
  • 2
  • 28
  • 58
0

unchecking "Use global provider shared between projects" and adding -std=c++11 to the command line for the compiler specified in the "CDT GCC Built-in Compiler Settings", which can be found by opening project properties and going to "C/C++ General", "Preprocessor Include Paths", "Providers" tab.

then rebuilding the index: right-click the project, "Index", "Rebuild".

for detail please refer to the answer by davmac in post: Type 'uint32_t' could not be resolved

custjcy
  • 1
  • 1
0

I had similar difficulties with Eclipse Oxygen.3 (with CDT 9.4 on Debian 7.10 64-bit, and GCC 4.7.2). I tried everything mentioned on StackOverflow as of March 30, 2018 to no avail.

Several headers in my project were being included by multiple source files. These headers were protected by #ifdef guards, but Eclipse CDT's CODAN code analysis system didn't seem to permit these guarded headers to apply to more than one .cpp source file. So numerous types and functions which returned those types were not recognized.

But after setting Window > Preferences > C/C++ > Indexer > Index all header variants, and then Rebuilding the index for the project, subsequent code analysis runs succeeded.

See a related answer from me if trying to utilize workspace-level settings.

MikeOnline
  • 994
  • 11
  • 18