Editing Compiling/Eclipse

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
This tutorial shows how to set up and use Eclipse for compiling and running BRL-CAD.  BRL-CAD uses the CMake build system so it can generate project files for a number of different development environments.  Here we show you how to create a project using the Eclipse CDT4 generator.
+
I will show you how to do that using the Eclipse CDT4 generator, which isn't different than using any other CMake generator. It works for in-source and out-of-source builds.
  
Note that you can [[Compiling/Eclipse/Manually|manually set up an Eclipse project]] for BRL-CAD, though there are several substantial differences in the result.
+
At first we need to run CMake, and set ”Where is the source code” and “Where to build the binaries”, but before thatyou have to be sure that you have a ''CMakeLists.txt'' file in the src directory .  Your project name should be different from your executable name and different from your build folder name. Otherwise, Eclipse will NOT pick up your executable as you build them. Our second work is that to select the generator(the window ''cmake-gui'' appears when you click '''Generate'''), in our case – Eclipse.
 
 
At first we need to run CMake, and set ”Where is the source code” and “Where to build the binaries”, but before that you have to be sure that you have a ''CMakeLists.txt'' file in the src directory .  Your project name should be different from your executable name and different from your build folder name. Otherwise, Eclipse will NOT pick up your executable as you build them. Our second work is that to select the generator(the window ''cmake-gui'' appears when you click '''Generate'''), in our case – Eclipse.
 
  
 
[[Image:Compiling-Eclipse-1.PNG]]
 
[[Image:Compiling-Eclipse-1.PNG]]
  
For Eclipse, it is important that the build directory not to be a subdirectory of the source directory due to a CMake limitation.
+
For Eclipse is important that the build directory to another and not to be a subdirectory of the source directory.
  
 
[[Image:Compiling-Eclipse-2.PNG]]
 
[[Image:Compiling-Eclipse-2.PNG]]
 
   
 
   
In the next step you have to run Eclipse and import your new project.   
+
In the next step you have to run Eclipse and import new project.   
 
''File/Import/General/ Existing Projects into Workspace'', Then just click '''Next'''.  
 
''File/Import/General/ Existing Projects into Workspace'', Then just click '''Next'''.  
  
Line 20: Line 18:
 
[[Image:Compiling-Eclipse-4.PNG]]
 
[[Image:Compiling-Eclipse-4.PNG]]
  
Next, we could build everything, but here we build pieces of the project with the ''benchmark'' and ''mged'' targets. First, the BRL-CAD benchmark:
+
And now I will build project with targets ''benchmark'' and ''mged''. At first – benchmark:  
 
''Project/Make Target/Build...'', then select target:''benchmark''(location ''bench'') and click '''Build'''
 
''Project/Make Target/Build...'', then select target:''benchmark''(location ''bench'') and click '''Build'''
 
   
 
   

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)