I am trying to add a new pass to the llvm compiler infrastructure.
I have been able to build LLVM-2.9 using make.But I wants to build using Eclipse
so that I can trace the code.
I imported llvm source files to c++ project with LinuxGcc tool chain
and CDT internal builder(Eclipse with CDT-7.0).But it gives some errors.
Is this is a right way to build llvm using eclipse?.
Please suggest me steps involved to build llvm source using Eclipse.
Note: Platform ubuntu.
Tools/versions used by me:
eclipse 4.3 Kepler, CDT 8.2.1
Oracle Java SDK 1.7.0_45
cmake 2.8.11.2
LLVM 3.5svn
Create a folder for CDT project files in your workspace. I.e. workspace/llvm.
Generate CDT project files with cmake (being in workspace/llvm):
cmake -G "Eclipse CDT4 - Unix Makefiles" -D_ECLIPSE_VERSION=4.3 ../../src/llvm
If eclipse version is not set the generator will assume 3.7 and inform you that it can be changed by CMAKE_ECLIPSE_VERSION option, what turns out to be the wrong name for that option.
Increase eclipse heap allocation size. The default setting is too small and C++ Indexer would hang the whole IDE. Replace default settings with
-Xms512m
-Xmx1024m
in eclipse.ini file.
Import the project into your workspace. File → Import... → General → Existing Projects into Workspace.
The project llvm can be built as one (option Build Project). There are also separated targets created for every lib and executable, placed in [Targets] folder. Individual target can be built with option Make Targets → Build...
You can use cmake -G"Eclipse CDT4 - Unix Makefiles" to produce the native Eclipse set of projects. It might require tweaking your CMakeLists.txt to remove the check for in-source builds (since Eclipse can only support project files and sources in the same directory, but for some reason the current CMakeLists allows it for MSVS only) - just follow the error messages.
Related
I have downloaded the Netbeans sources (v8.1) to make a small change in Netbeans.
So I followed the instructions on that page:
http://wiki.netbeans.org/WorkingWithNetBeansSources
Imported the Netbeans sources with Mercurial: $ hg clone http://hg.netbeans.org/main-silver/. Works.
Build a new fully functional Netbeans Dev Version from the commandline with ant. Works.
According to the instructions I should be able to do that: "The whole source tree has NetBeans project metadata so you can just use NetBeans to develop NetBeans". But that doesn't work.
That's my environment: Netbeans 8.0.2 64Bit, Java 8, Ant 1.9.x, Mercurial 3.6.2. The sources are from 8.1.
As you can see in the screenshot below, the modules (like ant.browsetask or ant.debugger) do have a directory nbproject, but this directory contains only two files: project.properties and project.xml. Shouldn't there be more files? Are these two files sufficient for Netbeans, so it can be recognized as a project?
So how can I open the Netbeans sources in Netbeans?
Ok, I found the solution by myself.
Netbeans needs to have the plugin 'Netbeans Plugin Development' installed. I uninstall it usually, because I don't do that, but now's an exception.
I use Eclipse to program in Java and , having already familiar with this development environment , I would use it for C/C++ projects.
Version: Eclipse SDK 4.2.2 (Juno)
O.S.: Ubuntu 12.04 LTS
I installed the CDT plugin by following the italian guide of the ubuntu documentation:
http://wiki.ubuntu-it.org/Programmazione/Eclipse#CDT
The only difference is that, at point 4, I have not included the source shown (Galileo), but the my version (Juno)
http://download.eclipse.org/tools/cdt/releases/juno
it's ok, found the source
CDT Main Features
CDT Optional Features
the installation is successful (indeed Eclipse show me CDT as the latest software installed, and an subsequent attempt to reinstall, Eclipse returns an error that it is already installed)
The problem is that when I restart Eclipse , I have no change. For instance , if I open the menu " File -> New -> Other" , I have no additional option to create a new C/C++ project.
I regularly installed on my computer the C/C++ compiler (gcc and g++ , version 4.6.3).
I also tried to install the plugin from the terminal:
sudo apt-get install eclipse-cdt
no change.
I search through the options in Eclipse to see if it was a problem enabling views of items in the menu, but nothing. Even in the "Window -> Preferences" I have no "C/C++" category .
I also changed my workspace ..... nothing .
Please help me, thanks
i had the same issue. i installed the latest eclipse, luna and mars. both had the c/c++ development tools.
my development environment had an older version of java installed, i.e. 1.6. apparently, luna/mars require 1.7 to be installed. i, at first, modified the eclipse.ini file to
-vmargs
-Dosgi.requiredJavaVersion=1.6
i started eclipse and the c/c++ project was not available. so i couldn't create a c/c++ project because it wasn't available in the wizard.
i updated my java to 1.7 on my machine; changed the eclipse.ini file back
-vmargs
-Dosgi.requiredJavaVersion=1.7
then started eclipse. viola. the option to create a c/c++ project is now available.
so basically, it seems that the newer eclipse requires 1.7 java. otherwise, it will disable features.
First of all, you have to open "C/C++ perspective". Try to go to menu "Window--Open Perspective -- Other--C/C++".
When you are in C/C++ perspective you should be able to create a new C/C++ project.
Also if you already have a loaded project, you can to convert to C++ project. Simply select it and then follow the right-click menu: "New" -- "Convert to a C/C++ Project (Adds C/C++ Nature)". Alternatively, simply go to menu File--New--Convert to C/C++ Project and it will show the list of all projects.
But again, the first and major step is to switch to C/C++ perspective.
Good luck!
I downloaded Eclipse for Parallel Application Developers, Kepler version, on my Debian x64 system, as well as gfortran 4.7.2 from the repository. When I open Eclipse, I select File -> New -> Project -> Fortran Project, then select Executable -> Empty Project. After entering a project name and selecting the only toolchain available (Intel Fortran Toolchain on Intel 64) and clicking Next, I get to a window with an error message that says
At least one configuration should be available. Project cannot be created.
and I can't progress from there (the Finish button is greyed out). What am I doing wrong? How can I create a fortran project in Eclipse?
According to the user's guide, you should select Executable (GNU Fortran) and not Empty Project.
I have imported a project built with CMake into Netbeans 7.2. I can succesfuuly build the project from netbeans, however:
I dont know what build configuration is being used (i.e. debug or release). I suspect it is a debug release due to the size of the built library.
How do I create Debug and Release builds for use in Netbeans?
I believe the default build is indeed Debug.
To change the configuration to release, you need to invoke CMake with the command line argument -DCMAKE_BUILD_TYPE=Release.
From what I recall, it's not possible to change configuration types easily from within the IDE, and this bug report seems to indicate that this is still the case.
I was hoping to use the Qt plugin with Eclipse. The installation is very simple - just expand a tarball in the appropriate directory. After doing so, I can see trolltech folders under eclipse/features and eclipse/plugins. However, when I try to create a project, I see no sign of any Qt option. Nor do I see Qt listed in the Installed Software listing of plugins or features.
Eclipse: Galileo Build 3.5.2
CDT: 6.0.0.2
O/S: Ubuntu 10.10 i686 2.6.35-28-generic
Plugin in tarball: qt-eclipse-integration-linux.x86.1.6.1.tar.gz from here: http://qt.nokia.com/developer/eclipse-integration/
Starting Eclipse with -consolelog -debug didn't offer any enlightenment
Have the Qt plugins aged past their use-by date?
Update
Installing to /usr/share/eclipse is a mistake
Installing to /usr/lib/eclipse works
I would suggest that that the instructions on the Qt page could use some revision. Instead of saying:
Find your eclipse/plugins folder
It might be better to add: The eclipse folder should contain the eclipse executable, eclipse.ini, the plugins directory, and the features directory.
This would have kept me from being fooled by /usr/share/eclipse, which has a feature directory and a plugins directory, but is not the correct place to install additional plugins.
Try untaring under the dropins directory instead. Modern versions of Eclipse will not pickup plugins overlaid over the existing plugins and features directories. If dropins doesn't work then these plugins declare dependencies on older versions of eclipse components.
Find out where your eclipse installation lies in terminal. I have mine extracted to ~/tools/eclipse/
$ which eclipse
Navigate to the folder and extract the plugins into the plugins folder, the features into the features folder.
Start Eclipse back up and go to Window->Preferences->QT. Click Add and navigate to the executable directory. For me as of version 4.8.1 it was in /Qt/Desktop/Qt/4.8.1/gcc/bin. The includes directory auto updated to /Qt/Desktop/Qt/4.8.1/gcc/include, click Apply and restart if necessary.
After this I can create a new Qt Gui projects, Qt gui classes, Qt resource files and Qt console projects in addition to Qt Designer forms.