eclipse-cdt

How to enable instruction stepping in eclipse-cdt (Eclipse for C++) by default?

删除回忆录丶 提交于 2019-12-11 09:56:15
问题 I repeatedly debug a program in Eclipse CDT in instruction stepping mode, i.e. a "step over" causes the next assembler/machine code instruction to be executed rather than the next line of C/C++ code. Because I do it over and over again, it nags me to have to press the "instruction stepping" button again for every execution. Is there a way to enable it by default? I tried to find it in the debug configuration settings of the program that I debug, but I didn't find it there. 回答1: By default

make: *** [src/Class.o] Error 1 eclipse

£可爱£侵袭症+ 提交于 2019-12-11 09:22:59
问题 ok so i installed CDT for C++ development on my machine. I tried to make it work and followed these instructions to set everything up. By mistake i have gone into the Project>Properties>C++ Build>Enviorement and hit restore defaults by mistake. I dont know if that changed anything but i get the following error when i run my class. I tried to switch the slashes in the given path "C:\Users\Nathan\workspace\Project\Debug" to forward slashes but that did nothing. I still get the same error. Any

How to allocate an input file instead of the stdin in an Eclipse CDT application?

試著忘記壹切 提交于 2019-12-11 08:54:22
问题 My application is a simple executable used from the command line and takes stdin as input and stdout as output, so it behaves like many GNU tools. To test it, I want to set up an Eclipse CDT DEBUG Configuration to pass a file to stdin and another one to stdout . I have tried unsuccessfully a few solutions, all inside the DEBUG Configuration GUI : In Common / Standard Input and Output / Input File: I put inputfile.txt and in the same section Output file: I put outputfile.txt . As the GUI

Program input (cin or getline) is read in correct when running but not when debugging

徘徊边缘 提交于 2019-12-11 08:52:17
问题 I'm having trouble trying to debug C++ with input from cin and/or getline. It works perfectly when I run instead of debug. I'm using Eclipse neon CDT in Windows 8.1 with MinGW compiler/debugger (64bit). Running a sample program to isolate the issue that uses getline for input and extracts the first character for comparison: while (true) { cout << "Enter x to exit: "; getline(cin, input); myChar = input[0]; if (myChar=='x') { break; } cout << "You entered: " <<myChar<<endl; } cout <<"Exiting..

Eclipse CDT C++ NULL not resolved

删除回忆录丶 提交于 2019-12-11 08:26:56
问题 Related: Eclipse CDT "Symbol NULL could not be resolved" I was under the impression that NULL was a standard macro in C++ and didn't need any headers to be included. Eclipse, on the other hand, thinks it doesn't exist. Is there some way to remind Eclipse that I'm in C++ mode not C mode for this file, and therefore to shut up about the NULL problem? 回答1: I was under the impression that NULL was a standard macro in C++. It is, but it's not part of the language. You still need to include

How to install CDT plugin on Aptana Studio 3

丶灬走出姿态 提交于 2019-12-11 08:08:43
问题 Things tried: Go to Install New Software -> Selected C/C++ development tools. I get the following error Cannot complete the install because of a conflicting dependency. Software being installed: C/C++ Development Tools 8.0.0.201106081058 (org.eclipse.cdt.feature.group 8.0.0.201106081058) Software currently installed: Aptana Studio 3 3.0.4.201108101506-10082011150838 (com.aptana.rcp.product 3.0.4.201108101506-10082011150838) Only one of the following can be installed at once: Debug Core 3.7.0

How to compile windows base program with eclipse cdt(using VIsual Studio compiler)

╄→尐↘猪︶ㄣ 提交于 2019-12-11 07:36:00
问题 i'd like to compile (debugging if possible) windows program in eclipse cdt with microsoft copmiler. It's better to support eclipse tool-chain (in eclipse cdt) It's impossible to find this solution in google, except using mingw's make and Visual Studio Makefile.. Are there anyone to have solution with this problem? 回答1: You want to use Wascana, an Eclipse/CDT distro targeted at Windows-development. Unfortunately the Windows-support is not complete; since it lacks a proper debugger. 来源: https:/

How to compile a dlib example using eclipse in windows?

与世无争的帅哥 提交于 2019-12-11 07:28:29
问题 I downloaded dlib and I want to compile one of the files in the examples directory using eclipse-cdt in windows. Here is what I did for now : Download dlib to C:\dlib-18.18 Create a new project in eclipse Create a folder src in this project Put a file from examples directory inside src (for example face_dection_ex.cpp) Put dlib/all/source.ccp inside src Add C:\dlib-18.18\dlib to my include paths (GCC C++ Compiler) Add DLIB_JPEG_SUPPORT to my preprocessor (GCC C++ compiler) Add the following

Eclipse CDT get GCC options from code

。_饼干妹妹 提交于 2019-12-11 07:09:16
问题 I am working on an Eclipse Plugin that among other things must check which compiler options are set in the current C project. Basically, I want to access the Properties -> C/C++ Build -> Settings -> GCC C Compiler -> All options field. I have searched how to access it, but I haven't found a way to do it. I tried to acces it via the preferences like in the following code : IEclipsePreferences root = Platform.getPreferencesService().getRootNode(); I can access the preferences of my plugin this

Eclipse CDT, environment variable for “name of file being currently compiled”

佐手、 提交于 2019-12-11 06:22:34
问题 I need to select some command-line parameters variable with name of file such as: g++ [options] ${something}.s [other parameters] foo.cpp to have assembly output same as foo.s for foo.cpp and bar.s for bar.cpp for all files of project. Where can I find the necessary environment variable ${something}? 来源: https://stackoverflow.com/questions/45402460/eclipse-cdt-environment-variable-for-name-of-file-being-currently-compiled