eclipse-cdt

Eclipse c++ class generation formating

末鹿安然 提交于 2019-12-13 01:27:30
问题 I've switched to Eclipse Mars.1 and I can't figure out how to fix this. Here's the problem: I right click on the subfolder MySubFolder and choose New->Class In Class name field I enter MyClass and fill the namespace with MySubFolder and click on Finish The generated .cpp has the partner include surounder with angle bracket and full path : #include <MySubFolder/MyClass.h> I want it that way : #include "MyClass.h" I tried ticking C/C++->Code Style->Include Style->Closely Related Headers-

Eclipse CDT cannot find built exe file after building, have to click run configuration

天涯浪子 提交于 2019-12-13 01:22:41
问题 I am using Eclipse CDT. I encounter a really weird problem. After I built a project, I click on the project and choose run as -> local c/c++ project , it will throw a binary not found error. If I right click the project -> run configuration , but does not make any changes or touch any buttons, and click Run , it compiles and runs perfectly... So everytime, I have to click the run configurations , and then hit run. I also have the auto-build option on in the properties. Does anyone have an

Eclipse CDT syntax error parser false error with Mat assignment: It compiles and runs ok

流过昼夜 提交于 2019-12-13 00:04:09
问题 In this line of code, the x is red underlined as error: cv::Mat x = cv::Mat::eye(2,2,CV_8U); with this description: Invalid arguments ' Candidates are: Mat() Mat(int, int, int) Mat(int, int, int, const cv::Scalar_<double> &) ... (it goes on, full error description at the bottom) It compiles and runs ok. 09:12:02 Build Finished. 0 errors, 0 warnings. (took 1s.721ms) It used to work fine. I can't tell exactly when this started, but in the middle I updated Eclipse to the last stable version

Calling Ada from C++ in Eclipse

浪尽此生 提交于 2019-12-12 21:59:39
问题 I am trying to create a program that is completely hosted in Eclipse, starts in C++, and calls Ada. I have GNATBench loaded, and can run Ada programs without a problem. What I cannot do is have a C++ project call an Ada project. After hunting around, I found and executed the code shown below using a make file. http://www.pegasoft.ca/resources/boblap/book.html I also found a post stating that my goal has been done. http://blogs.windriver.com/parkinson/2009/10/yesterday-adacore-announced-the

CDT IASTNode getRawSignature after preprocessor

好久不见. 提交于 2019-12-12 20:27:43
问题 In CDT core plugin, there is a method getRawSignature of interface IASTNode that was described as: Returns the raw signature of the IASTNode before it is processed by the preprocessor. Example: #define ONE 1 int x=ONE; // getRawSignature() for this declaration would return "int x=ONE;" But I want to get the String signature after the node is processed by the preprocessor In the above example, the expected string is: int x=1 How to get this string? I have looked at some other methods, but no

Eclipse CDT : automating Organize Includes

本小妞迷上赌 提交于 2019-12-12 19:03:12
问题 Is there an option to automate the context menu/Source/Optimize includes functionality? Perhaps on file save, or on exiting or starting the IDE ... Failing that, is there a plug-in? 回答1: I assume you mean Organize Includes. I'm not aware of a built-in way to configure that to run after every file-save, nor of a plugin that would do it. Consider filing a bug requesting that an option to run Organize Include be added to Preferences -> C/C++ -> Editor -> Save Actions. 来源: https://stackoverflow

Programatically modify Eclipse workspace and CDT options from a plugin

折月煮酒 提交于 2019-12-12 18:23:43
问题 I want to modify an Eclipse workspace programatically from within a plugin (adding existing projects is my main request). Also I want to modify CDT options (environment, indexer options) from within that plugin. Does anyone know how to best do this or can point me to good documentations on that topic? EDIT: Actually I don't want to modify CDT project settings but some of the global CDT settings (actually I want to disable the indexer). 回答1: It depends the kind of modification you are after.

eclipse - how to treat file extension as C-file

这一生的挚爱 提交于 2019-12-12 17:05:21
问题 How do I force Eclipse to treat a file-type as a C/C++ file so it'll index them? My makefiles create .pp files for pre-processor output and I want to view those as C/C++ files. 回答1: You can define a mapping from the .pp extension to the C++ Source File file type in Preferences | C/C++ | File Types . 来源: https://stackoverflow.com/questions/46163332/eclipse-how-to-treat-file-extension-as-c-file

What would cause my source files to be greyed out with a strikethrough through the file icon?

蹲街弑〆低调 提交于 2019-12-12 16:14:13
问题 I'm trying to build an application for the STM32F4 Discovery board using Eclipse Mars. In particular I'd like to use the SPI library. I've included the corresponding header file in my main program but am getting the error that the function I'm trying to use is undefined. A little bit of poking and I realize that most of the source files for the project are greyed out with a bar struck through the icon. Most I could find was people talking about how entire folders were greyed out. I've tried

Eclipse CDT & gtkmm: “… could not be resolved.”, but compiles and runs

断了今生、忘了曾经 提交于 2019-12-12 12:37:07
问题 I'm coding in Eclipse CDT in C++ with gtkmm. I have managed to set up Eclipse so it compiles the code correctly, by adding pkg-config gtkmm-3.0 --cflags --libs to the compiler options. So it runs, and works. But in the editor is everything gtk related underlined with red and when I hover over those parts, it says something like: Type 'Gtk::Main' could not be resolved . So I could code like this, but it's really a pain with autocompletion not working and red lines all over the screen. How can