eclipse-cdt

Eclipse Plugin - get Launch Configurations Tree List in a Dialog.

牧云@^-^@ 提交于 2020-01-24 19:44:10
问题 I'm currently trying to get the red part of the "RunConfigurations..." window, (see img 1.1) into an TitleAreaDialog (see img 1.2). The final result should look like this: (see img 1.3) img 1.1 img 1.2 img 1.3 With the plugin "Spy" I found some useful information: The "Run Configurations..." window (img 1.1) is created in the class: "LaunchConfigurationsDialog" which has a "LaunchConfigurationView" as an attribute (note: this attribute is a class). Within this private attribute you find a

Eclipse CDT New Project Template - How to add a library

青春壹個敷衍的年華 提交于 2020-01-24 07:24:08
问题 In Eclipse CDT Indigo, there is a new feature that allows you to add new C/C++ template projects to the new project wizard. I've figured out how to do this successfully up to a point. I can create a basic project that just depends on simple source files but now I'd like to create a CPPUnit project to which I'd like to automatically add the CPPUnit library. For the life of me, I can't figure out how to achieve this end. Does anyone know how? 回答1: Sorry I am late, but I just had the very same

EClipse CDT/Juno and linker options --start-group

半世苍凉 提交于 2020-01-23 08:08:22
问题 I know the -l and -L options for link but I am looking to set the --start-group and --end-group and all my libraries into my C project (Properties) under CDT/Juno but where do I put this option ???? -Xlinker ? Thanks Marc 回答1: You can insert this options through "Expert settings: Command line patterns". To insert the options -Wl,--start-group and -Wl,--end-group you can edit this field. Follow the steps below: Click in the option GCC C/C++ Linker Edit the field Command line pattern from $

How to change warrning and errored highlighted text background colour in eclipse?

半世苍凉 提交于 2020-01-15 23:35:48
问题 I want to change the warring and errored highlighted text background color in eclipse. edit:- I have tried Window > Preferences > General > Editors > Text Editors >Annotations > C/C++ Occurrences > Color (i am noob to eclipse) 回答1: It looks like the color is coming from a "highlight" shown for error and warning annotations. The place to configure these is Window | Preferences | General | Editors | Text Editors | Annotations . For each annotation type, you can change the highlight color, or

Eclipse Luna error messages on GDB and Valgrind, unable to Debug or Profile C++ program as Local C/C++ Application

时光总嘲笑我的痴心妄想 提交于 2020-01-15 11:16:08
问题 I downloaded Eclipse Luna for 64-bit Mac OS X just a few days ago. Would like to use Eclipse for a small C++ program assigned as student homework. Set this up as an Eclipse C++ project. I built the selected configuration as Debug and run it as Local C/C++ Application. All good. My C++ program runs and output appears in Console window exactly as I want it. When I attempt Debug as Local C/C++ Application there is a message window Error with command: gdb --version. Cannot run program 'gdb':

Eclipse CDT: How to write to .cproject file and read back

核能气质少年 提交于 2020-01-15 11:09:35
问题 How to write programmatically to .cproject file and read back (in Eclipse CDT)? A class implementing AbstractCPropertyTab has checkboxes and name and boolean state of these should be saved to .cproject. 回答1: I solved my own question. Maybe someone finds this useful. I will introduce two methods: one for saving checked state of the checkboxes on the table and one to initialize the checkbox values. /** * Saves checked state of the packages. */ private void saveChecked() {

Eclipse CDT: How to write to .cproject file and read back

烂漫一生 提交于 2020-01-15 11:09:07
问题 How to write programmatically to .cproject file and read back (in Eclipse CDT)? A class implementing AbstractCPropertyTab has checkboxes and name and boolean state of these should be saved to .cproject. 回答1: I solved my own question. Maybe someone finds this useful. I will introduce two methods: one for saving checked state of the checkboxes on the table and one to initialize the checkbox values. /** * Saves checked state of the packages. */ private void saveChecked() {

MinGW's compiler option Wl,--kill-at does not work

女生的网名这么多〃 提交于 2020-01-15 08:15:12
问题 I am currently struggling to compile a Dll for JNI use, using Eclipse CDT and MinGW. Following a tutorial, i created a Java class that declares native methods, then used javah to get the relevant header file and I implemented it in a C++ class. The C++ code is very simple and compilation works, but when I load the library into the Java class, i get this error : Exception in thread "main" java.lang.UnsatisfiedLinkError: Main.integerMethod(I)I at Main.integerMethod(Native Method) at Main.main

Why is gdb not working in eclipse when it is working fine from command line?

大城市里の小女人 提交于 2020-01-15 03:49:30
问题 I have created and successfully compiled a C++ application for Linux using eclipse. When I debug it from the command line everything works perfect, I can debug just fine. But I require debugging in eclipse because is more convenient and easy. I configure the debug session and when trying to launch it I get the error: Error in final launch sequence Failed to execute MI command: -exec-run Error message from debugger back end: Warning:\nCannot insert breakpoint 1.\nCannot access memory at

warning message RTTI symbol not found when using boost::iostreams

喜欢而已 提交于 2020-01-14 08:59:12
问题 I use Boost::iostreams to write simultaneously to my console and a file. When i use eclipse to debug(with gdb of course), i receive a warning which says RTTI symbol not found for one of the classes that i am using from Boost::iostreams. Here is the minimal code to reproduce the problem. #ifndef BOOST_IO_STREAM_H_ #define BOOST_IO_STREAM_H_ #include <fstream> #include <boost/iostreams/tee.hpp> #include <boost/iostreams/stream.hpp> using boost::iostreams::tee_device; using boost::iostreams: