I'm developing an Eclipse plug-in to help my colleagues create C++ projects build configurations from a simple user interface. The only build configuration parameter I can't set programmatically is the project build location, surrounded with a red box in the above image.
I was looking for a function of org.eclipse.cdt.managedbuilder.core.IConfiguration to do that, but I didn't find any. Can you help me please on this? I'm using Eclipse 4.6.3 and CDT 9.2.1
Based on the CDT source code, that dialog's code sets the build path using IConfiguration.getEditableBuilder().setBuildPath().
Related
Thanks in advance for the help.
This is on Windows/MSYS2 (mingw64) Eclipse CDT Version: 2019-09 R (4.13.0) Build id: 20190917-1200.
I have figured out how to run cmake in order to create an Eclipse compatible project file. I then got the project into Eclipse via I got this File->Open Project from File System. I can then make/build that file and create my executables. I do get a couple warnings regarding improper project path but the code all compiles without error.
However, I need to "connect" the cmake build directory (i.e. the project in Kicad) to my source code in order to edit and/or debug the changes I wish to make. Based on my research I believe I have to do this via the Project Properties C/C++ Build menu, however, this menu is not present. I believe I access this menu by selecting the project on the left and right clicking or alt-enter or from the top menu Project->Properties.
For some reason I can't do a screen grab on Eclipse but I pulled the image attached from the online help file: (https://help.eclipse.org/2019-06/index.jsp)
.
My "Project->Properties" menu looks similar in that it shows Resource, Builders, plus more things but there is no C/C++ Build entry: it just goes from Builders to C/C++ General.
I found this "solution" https://bugs.eclipse.org/bugs/show_bug.cgi?id=508319 which seemed appropriate as I had installed the standalone debugger, however, uninstalling it had no effect.
Any suggestions?
Thanks
I'd like to activate the Netbeans Code Assistance but for C++, I just installed Netbeans 8.0 and followed all the steps in Netbeans site for installing Cygwing compiler. I am now able to compile C++ code; however the facility of Code Assistance doesn't appear. I don't know how to activate it.
Code assistance should be active by default. Make sure your project properties aren't screwed up:
Also you might need to add include directories in the Netbeans global options, which are in the "Tools" submenu for my Netbeans version:
I downloaded NetBeans IDE 7.3.1 and want to port my C++ projects from Eclipse IDE for C/C++ Developers Version 2.0.0 (it's my first installation of both IDEs, so there were no earlier versions on my PC - Win 7 32Bit)
As I tried the steps from Netbeans Support
I set up my Eclipse Workspace at E:\path. If I enter this path, according to
step 3:
In the Workspace Location page of the wizard, select the Import Projects from Workspace radio button and specify the workspace location. Click Next.
I am not able to go on importing because of the Error-Message:
*"E:\path" does not contain a regular Eclipse workspace.*
Does anyone have a clue of what's going on and / or know how to fix this? I stored all my Eclipse cpp projects in this folder by shifting them to subfolders like E:\path\Basics (Eclipse still recognizes the projects)
I would guess that you missed the import of the first sentence in your NetBeans support link. Here's the relevant portion with added emphasis...
An enhanced support for importing Eclipse projects is available in the
NetBeans IDE. The Import Eclipse Project wizard enables you to use
NetBeans to work on Java desktop and web application projects
that were created in Eclipse and MyEclipse.
You are trying to work on a C++ project and the wizard does not appear to be intended for that use.
So, I've got some stuff that I need to develop with pintools, and I'm having a hard time using eclipse with it all.
I found this, but it doesn't give very specific details. I was hoping that someone could provide very specific instructions as to how to use eclipse on Mac (or linux) to develop pintools.
I tried it a little, and found that on mac you have to install the clang build toolchain, and even then, doing a simple import of the MyPinTool was harder than it seemed because the makefile specifies a lot of extra options/variables that I don't know how best or correctly to configure in eclipse.
You can download pintools. The makefile that I'm talking about is in source/tools/MyPinTool, it sources a file located at tools/makefile.gnu.config
EDIT: by the way, I'm on Mac OS X Lion with an i7 using pin 2.12
c++ --version returns this:
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM
3.1svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix
I'll guess that you are using the newest version of Eclipse (4.2) and that you start working from the template MyPinTool pintool in "source/tools". I'll take those guesses because it is much easier to configure CDT to recognize the pin environment from a compiling tool, rather than manual configuring it.
First create a makefile project from existing source:
Then go to your project properties and select under "C/C++ General" -> "Preprocessor Include..." the "CDT GCC build output parser", make sure that it is enabled and if you are using clang++ as the compiler, that you add it in the compiler pattern:
Now build your pintool from within eclipse (either click on the hammer icon in the toolbar, or right click your projet and select "Build Project"). CDT should parse the build output and resolve all the paths and required macros from it. Basically, now you are good to go... But...
I have found that CDT has some quirks, if this doesn't work, try and do the following:
Check if you are working on a "deep" path (/a/b/c/d/e/f/g/h/i/j/k/l/m), sometimes CDT takes the relative build path used by the make file, and translates it to a wrong absolute path. I've found that working in a "shallower" path resolves this issue (I should open a bug report for this...).
Sometimes the indexer doesn't kick in right away. Try refreshing the project, rebuilding the index (Right click on project then "Index" -> "Rebuild"), and even restarting eclipse then doing this again.
I know it is a bit of voodoo magic, but I got it working :)
I tested this procedure on a fresh kit with MyPinTool but if it still doesn't work, please provide the steps you did and what errors does eclipse give you.
I am trying to learn C++ with Cygwin and Eclipse Helios.
I got all the development tools under Cygwin installed; and installed the CDT package for Helios.
The problem is I don't see an option to create a C++ project from makefile or any other option. I can only see options for a C Project, C++ project and a new project from existing source code.
Here is what I referred to:
Eclipse seminar
Developing applications using the Eclipse C/C++ Development Toolkit
Questions:
Is there any clear guide to setup Eclipse for Cygwin?
Am I missing something in the setup?
any other suggestion will be helpful.
Are you asking how to setup GCC in cygwin + Eclipse? How about this tutorial?
I found this tutorial to be a very good source. It was almostperfect, apart that one more path needed to be add to the folder containing cygstdc++-6.dll which prevented anything to be printed on console. So, add to the Project Properties -> C/C++ General -> Paths and Symbols -> Includes GNU C++ the path to the missing dll folder: ${CYGWIN_HOME}/usr/i686-pc-cygwin/sys-root/usr/bin.