Open ENate opened 2 months ago
Do not forget to include required headers, also some important c++20 features are not implemented and you may need to change compiler standard version (like limit to -std=c++17
in built-in compiler settings provider.) Simple std::string code should work fine with c++17 or lower.
Thanks @i-garrison . I added 17
in my make files etc. Do you think there is need to include -std=c++17
to
${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"
under the Eclipse Preferences->Build->Settings->Discovery? I suppose this will be picked up.
Thanks @i-garrison . I added
17
in my make files etc. Do you think there is need to include-std=c++17
to${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"
under the Eclipse Preferences->Build->Settings->Discovery? I suppose this will be picked up. You can check value of
__cplusplus
macro to confirm which C++ standard version you have configured. SeePreprocessor includes -> Entries -> CDT GCC Built-in Compiler Settings
- may have to reindex project for those to take effect.
I saw __cpluscplus=201703L
under the option you proposed. I only got to see Preprocessor Includes after selecting the project -> New -> ...Add C++ project Nature. Is this okay?
I saw
__cpluscplus=201703L
under the option you proposed. I only got to see Preprocessor Includes after selecting the project -> New -> ...Add C++ project Nature. Is this okay?
Hi @ENate you need to have your c++ project properly configured, so likely yes. Could be easiest to double-check by starting from scratch and selecting e.g. managed c++ build.
Thanks @i-garrison . So does this __cpluscplus=201703L
corresponds to C++ 17?
Thanks @i-garrison . So does this
__cpluscplus=201703L
corresponds to C++ 17?
It does, yes. Make sure your source file is recognized as c++ file and all necessary headers are included and resolved (check via indexer -> search for unresolved includes.) IOW it works for me with C++17.
Thanks indeed. This is my first experience with using Eclipse cdT for c++ development.
Describe the bug I am unable to access std::cout, std::string and similar C** libraries on Eclipse. When I open or create a new CMake (Makefile) project on eclipse C++, may of these libraries are not detected. I usually see the following error:
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen. I will expect that C++ libs and language server can automatically be picked up and code assist work normally. Screenshots If applicable, add screenshots to help explain your problem.
Version Information (please complete the following information):
Additional context Add any other context about the problem here. For example the error log (in workspace/.metadata/.log) or for GDB interaction issues the GDB traces