I can't find an easy way to add ede targets to my projects. I am looking for the way to add an install target or even a test target to run unittest.
How do you do that with ede-project-manager ?
If you are using one of the EDE projects that supports it, the operation can be found in the menu.
Step 1: Open a file in a project directory.
Step 2: Choose the menu item "Project->Project Options->Add target"
It will ask if you want to add the current file into that target.
You can also do:
M-x ede-new-target RET
Some EDE project types don't support this concept. Most notably the built-in Emacs and Linux project types, or the ede-cpp-root project, which is a quick hack to support the basics of the Semantic parsing infrastructure.
Related
I am trying to migrate a custom C++ project which uses Gtkmm3.0 to Eclipse (Oxygen) on Ubuntu 16.04. The project has its own Makefile and builds fine from the terminal within Eclipse. What I have not been able to do so far is tell the indexer about Gtkmm, and I get lots of these (which is very annoying):
When I hover over the little red bugs, it says:
Type 'Cairo::RefPtr<Cairo::Context>' could not be resolved.
I have done a lot of Googling on this and found nothing so far because all answers seem to assume the project's build tools are managed by Eclipse (See this or this, for example). In my case I have a makefile project instead of an executable project and hence some options are not available to me. For example, the first links speaks about configuring the builder:
We have to add all this directories. On Eclipse select the Project->Properties menu option. Select C/C++ Build->Settings property page and GNU C++ Compiler->Directories from the Tool Settings tab. Now we have to add all directories. In my case (Makefile project) only two tabs are available there: Binary Parsers and Error Parsers.
How can I tell the Eclipse indexer I am using Gtkmm3.0?
Found the solution that works for me:
Open a terminal and enter:
pkg-config --cflags gtkmm-3.0
You will see a list of includes directories (starting with -I). These are the directories you want to add in Eclipse so that it can locate the Gtkmm symbols in the editor.
In Eclipse, go to:
Project -> Properties -> C++ General -> Paths and Symbols
In the Includes tab, select GNU C++. You need to add here add the include directories found in step 1. There is no automated way to do this, yo must enter them one by one.
One trick that can save you some time is to edit manually the Eclipse project setting XML file and add the include directories directly in the XML file. By the end, you should have something that looks like this:
That did it for me, hope this helps!
How to exclude one project from automatic build in Eclipse?
I have one project in workspace, which is probably builds very long (even if nothing was changed). I want to keep this project opened to browse source code but I need not it is being build all the time.
How to disable automatic build for this project?
Probably this was a bug in Eclipse https://bugs.eclipse.org/bugs/show_bug.cgi?id=60803 and it was solved long time ago. Unfortunately, I can't find any per project options to control automatic build.
When you open the Project properties of the project that should not be built you can disable all Builders - especially the "Java Builder". This should prevent any automated action like compiling regarding the project.
An easier solution is to "Close Project" on the projects that you don't want to Build. I tried deselecting the Builders for the project, but this didn't work. Close Project on sample code, unused libraries and other "non-dependencies" allowed me to work with only the Projects of concern in the Package Explorer.
The best approach is to use the Inclusion and Exclusion Patterns option in the Java Build Path.
For example if you want to exclude one project from being automatically built:
1- Go to its Properties->Java Build Path->Source.
2- Expand the folder in the "Source folders on the build path:" area
3- Select Exclude->Edit
4- In the exclusion patterns add **
Note: for more information on this patterns: Include and Exclusion Patterns
Is there any role for the Project menu when working with StatET and Eclipse using Sweave and R?
If so, are there any learning resources that explain how this might work?
Do these menus offer anything over and above a makefile?
I'm curious to learn more about building moderately complex Sweave/LaTeX/R projects.
Specifically, the Project menu has options Clean... and Build Automatically which intrigue me.
I'm curious to learn more about building moderately complex Sweave/LaTeX/R projects. Specifically, the Project menu has options Clean... and Build Automatically which intrigue me.
Hi Jeromy, I never managed to properly setup R and Eclipse, so I will only give you a partial answer.
Generally the Clean command is used to remove the compiled files from a project, so I assume it will delete any .ps or .pdf file generated by Eclipse.
The Build automatically setting (which is an on/off switch) rebuilds the project every time you save a file.
As a side note, to generate reports I use the combo LyX + Sweave that works very well. And for R scripts I find Gedit + RGedit nice and lightweight.
I don't know the internals of Eclipse very well, but I think these menu items are there for generic Eclipse projects that can link to the utilities that build your 'project' from 'source'. Looking under Project > Properties > Builder shows one builder configured, 'R Internal' that is not configurable or editable.
Personally I've never used a makefile for Sweave document creation, instead using the External Tools menu to setup the process for building a sweave Rnw file into a PDF. (under Run > External Tools > Configure External Tools. Also see here). This has worked well for me.
Have you considered asking your question on the StatEt mailing list ?
I've been trying to get subprojects in EDE to work, but I don't understand much and I can't find any good documentation. What would the project configurations have to look like for the following tree:
Test
Project.el
bin
test
src
Project.el
main.cpp
class.cpp
inc
Project.el
class.h
To make a project like that, first create the toplevel project with:
M-x ede-new RET
and fill it in as an Automake or Makefile based project. (either is fine.) Then for each sub-directory, use ede-new again with the same project style. These projects will get linked together under the top-level project. You then use
M-x customize-project RET
to edit any features you need for the project. If you use dired, you can mark files and use the Project menu to add those files to some target, or create new targets to add them to. You don't need to know what is in the Project.ede files to do that. As it happens, the Project.ede file is just some Emacs Lisp code that creates the objects that represent the project you are working in.
I am new to eclipse and wanted to do the following:
Use my custom build commands with eclipse. Until now I only saw make all. I use a shell script for building my project; how can I use that in an Eclipse environment?
When I create a new project with the existing source code, it doesn't add the files, without building the code and if code fails to build (because I generally don't have make all).
How do I resolve this issue?
You can add a custom builder in the "Builders" category of the project properties.
project->properties->builders->new
there you can also deactivate the default eclipse builders..
hope that helped
In addition to what smeg4brains said and assuming that you are using the CDT plugin you can go to:
project -> properties -> C/C++ Build
Uncheck Use default build command on the Builder Settings tab and replace make with e.g. scons.
On the Behaviour tab you can then specify the target to call for the Build and Clean phase.
To resolve your second issue open the Project menu and uncheck Build automatically.
This will prevent Eclipse from building the project when it thinks it is necessary.
If you want to add other your own commands then the easiest way is to write Ant file for your project so by clicking once you can execute all your commands.To see how to write Ant file click here
I was able to do something similar to have protoc run on my .proto files. I did it by adding a "Make Target" to the project.
A lot of stuff in Eclipse you can get around using Ant, which are XML scripts, and there is also a ANT project builder which uses those. If you don't like to mess with frankly quite touchy GUI options, just write a build.xml and use ANT build as the project builder.