eclipse-cdt

Eclipse cdt: Includes header file correct, compiles, but highlights source code: “Unresolved inclusion”

蓝咒 提交于 2021-02-18 11:52:41
问题 I have a project that uses a shared library from another project. In project settings I put the correct include paths and library for the GCC and G++ compiler (-L and -l option). It all compiles well, no problems here. But the source code is not analyzed correctly. My included headerfile (that is located in the other project) is marked as "Unresolved inclusion and everywhere I use something from it, the source is highlighted as well. #include "myHeader.h" Any ideas? thanks! 回答1: The one that

Does Eclipse CDT's parser/indexer have a “self-identifying” preprocessor #define macro?

别等时光非礼了梦想. 提交于 2021-02-16 16:55:30
问题 I want to have some code only be included when Eclipse is parsing my source tree. At the moment, what I am doing^H^H^H^H^H trying to do is add a custom preprocessor macro - using Eclipse's Help | Preferences | C/C++ | Build | Setting Discovery - and insert a -DECLIPSE_BUILTIN into the various command-lines there. So I was wondering whether there is already a standard, a default, macro which the preprocessor (and the indexer?) define to 'identify' themselves like this to the code - to save me

Eclipse IDE for (Embedded C/C++) Developers 2020-12: Classic dark theme deep black color background and text in menu

只愿长相守 提交于 2021-02-13 17:23:29
问题 Problem with dark classic theme in Eclipse 2020-12 (4.18) for C/C++. Menu have all black color: Top panel has the same problem: 回答1: That's a bug of Eclipse TMF which is contained by default in the Eclipse IDE for C/C++ Developers and the Eclipse IDE for Embedded C/C++ Developers in Eclipse 2020-12 (4.18) that has already been fixed : Eclipse bug 569790 - [dark] Dark mode issue when Trace Compass is installed Unfortunately, this bug was detected and fixed only shortly after the 2020-12

How can I convince Eclipse CDT that a macro is defined for source code editing and code completion?

允我心安 提交于 2021-02-13 11:48:50
问题 I have in my source code: // foo.cpp struct foo { foo() {} #ifdef I_WANT_THIS_FEATURE void bar() {} #endif }; In my Makefile I have foo.o: foo.cpp g++ -c -DI_WANT_THIS_FEATURE foo.cpp -o foo.o This compiles fine from the command line as well as with the external builder that I have created in Eclipse (which basically defines a few environment variables and calls make ) and I can call foo::bar() . However, in the Eclipse CDT source code editor, the part where I define foo::bar() has a grey

How can I convince Eclipse CDT that a macro is defined for source code editing and code completion?

一世执手 提交于 2021-02-13 11:48:45
问题 I have in my source code: // foo.cpp struct foo { foo() {} #ifdef I_WANT_THIS_FEATURE void bar() {} #endif }; In my Makefile I have foo.o: foo.cpp g++ -c -DI_WANT_THIS_FEATURE foo.cpp -o foo.o This compiles fine from the command line as well as with the external builder that I have created in Eclipse (which basically defines a few environment variables and calls make ) and I can call foo::bar() . However, in the Eclipse CDT source code editor, the part where I define foo::bar() has a grey

Eclipse/nsight formatter doesn't respect function body indentation policy

╄→尐↘猪︶ㄣ 提交于 2021-02-10 08:35:09
问题 I use CUDA 8.0's version of nsight (Eclipse platform 4.4.0, CDT 8.4.0). My Eclipse C/++ formatter is configured to indent as follows (image is from the Formatter config prev: but if I have this code: and I press enter, get to the next line (the cursor is placed under the span ), and type in an opening brace, it is not placed at the beginning of the line, but is rather kept indented: Is this a bug or have I misconfigured something? Notes: I tried both the built-in formatter and the "CUDA C"

Eclipse CDT Unresolved inclusion

隐身守侯 提交于 2021-02-10 07:49:34
问题 I've code that already compiled using makefiles. I'm trying to edit it using Eclipse 4.2. My problem is with some includes that are not resolved: #include <kik/sip/sip_api.h> The file sip_api.h is in kik/sip/kk/include . I've added the relevant directory to the project includes. What is the problem? 来源: https://stackoverflow.com/questions/11833310/eclipse-cdt-unresolved-inclusion

Unresolved Inclusion in Eclipse CDT

走远了吗. 提交于 2021-02-10 06:15:19
问题 I have read: unresolved external symbol in eclipse cdt and Unresolved inclusion in Eclipse I am using Eclipse CDT Neon Version: Neon.3 Release (4.6.3). Eclipse CDT can compile my code but for some reason, it highlights #include <boost/algorithm/string.hpp> #include <boost/algorithm/string/split.hpp> as "Unresolved inclusion". I have already set the include path for my GCC compiler (in properties->C/C++ Build->Settings->Tool Settings->Includes) to have /opt/boost, which symlinks to /opt/boost

Unresolved Inclusion in Eclipse CDT

冷暖自知 提交于 2021-02-10 06:13:57
问题 I have read: unresolved external symbol in eclipse cdt and Unresolved inclusion in Eclipse I am using Eclipse CDT Neon Version: Neon.3 Release (4.6.3). Eclipse CDT can compile my code but for some reason, it highlights #include <boost/algorithm/string.hpp> #include <boost/algorithm/string/split.hpp> as "Unresolved inclusion". I have already set the include path for my GCC compiler (in properties->C/C++ Build->Settings->Tool Settings->Includes) to have /opt/boost, which symlinks to /opt/boost

Eclipse Luna CDT: What is a header variant?

筅森魡賤 提交于 2021-02-07 19:47:13
问题 I am having difficulty getting the Eclipse Indexer (Codan) to recognize certain data declarations in header files. There is a new preference to Index all header variants, but little explanation as to what this means. Enabling the preference seems to fix the problem. But I still would like to know what the preference does exactly. 回答1: Let's say you have header a.h like this: #pragma once #ifndef SYMBOL #define SYMBOL int #endif struct S { SYMBOL sym; }; And now if you include your header like