User Tools

Site Tools


eclipse

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
eclipse [2019/04/02 16:59]
beenisss Updates to advice on includes and symbols, mainly for Mac
eclipse [2019/11/22 16:57] (current)
daschuer
Line 21: Line 21:
 Now have to setup the Mixxx source and manage to compile it via the command line, as outlined here: [[compiling_on_linux]] or [[compiling_on_os_x]] or [[compiling_on_windows]] Now have to setup the Mixxx source and manage to compile it via the command line, as outlined here: [[compiling_on_linux]] or [[compiling_on_os_x]] or [[compiling_on_windows]]
 This may take up to 60 min on the fist time.  This may take up to 60 min on the fist time. 
 +
 +**Using Scons:​** ​
  
 <code bash> <code bash>
 scons -j4 # replace 4 with the number of CPU cores that can be utilized ​ scons -j4 # replace 4 with the number of CPU cores that can be utilized ​
 +</​code>​
 +**
 +Using CMake (experimental):​** ​
 +
 +To save during comiling time after switching branches make sure ccache is installed. ​
 +
 +
 +<code bash>
 +mkdir build/​Debug ​
 +cd build/Debug
 +cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS:​BOOL=ON ../.. 
 +make -j4 # replace 4 with the number of CPU cores that can be utilized
 </​code>​ </​code>​
  
-Test your build: ​+** 
 +Test your build:** 
  
 <code bash> <code bash>
 ./mixxx ./mixxx
 +./​mixxx_test
 </​code>​ </​code>​
  
Line 48: Line 64:
   * eclipse   * eclipse
   * eclipse-cdt   * eclipse-cdt
-  * eclipse-pydev 
  
  
Line 66: Line 81:
  
 For Eclipse 2018-09 For Eclipse 2018-09
 +
 +General:
  
   * Start Eclipse.   * Start Eclipse.
Line 77: Line 94:
   * Expand C/C++ -> Build -> console   * Expand C/C++ -> Build -> console
   * Limit console output = 10000   * Limit console output = 10000
-  * ---+  * Verify Project Explorer is visible. If not go to Window ​-> Show View -> Project Explorer 
 +  * In the Project tree, right-click on the build folder and choose Properties 
 +  * Check '​Exclude resource from build',​ Apply and Close 
 +  * Repeat for the cache folder  
 + 
 +For Scons builds: 
   * File -> New -> Makefile Project with Existing Code.   * File -> New -> Makefile Project with Existing Code.
   * Set Project Name to ''​mixxx''​.   * Set Project Name to ''​mixxx''​.
Line 84: Line 107:
   * Select Toolchain for indexer setting = ''​Linux GCC''​ (this would be for a Linux host, substitute your OS as applicable).   * Select Toolchain for indexer setting = ''​Linux GCC''​ (this would be for a Linux host, substitute your OS as applicable).
   * Finish.   * Finish.
-  * Right click on the new project in Project Explorer -> Properties -> C/C++ Build (if Project Explorer is not visible, go to Window -> Show View -> Project Explorer).+  * Right click on the new project in Project Explorer -> Properties -> C/C++ Build 
   * Uncheck "Use default build command"​.   * Uncheck "Use default build command"​.
   * Build command ​   * Build command ​
Line 114: Line 137:
   * Uncheck "Use global providers ..."   * Uncheck "Use global providers ..."
   * Edit the command to <​code>​${COMMAND} ${FLAGS} -std=c++11 -E -P -v -dD "​${INPUTS}"</​code> ​   * Edit the command to <​code>​${COMMAND} ${FLAGS} -std=c++11 -E -P -v -dD "​${INPUTS}"</​code> ​
-  * Close Properties +  * Note: The indexer should work after a full rebuild that allows Eclipse to parse all compiler arguments. 
-  * In the Project ​treeright-click on the build folder and choose ​Properties + 
-  * Check '​Exclude resource from build',​ Apply and Close + 
-  * Repeat for the cache folder ​ +For CMake Builds (experimental)  
 + 
 +  * Install cmake4eclipse via the Eclipse Marketplace  
 +    * Help -> Eclipse Marketplace... 
 +    * search for cmake4eclipse and press Install.  
 +    * Follow the install Wizzard and restart Eclipse 
 +  * File -> New -> Project... -> C++ Project  
 +  * Set Project Name to ''​mixxx''​ 
 +  * Uncheck "Use default location"​ 
 +  * Browse to your Mixxx source folder e.g. ''​~/​eclipse-workspace/​mixxx''​. 
 +  * Project Type: Executable -> Empty Project 
 +  * Toolchains: Linux GCC (this would be for a Linux hostsubstitute your OS as applicable). 
 +  * click Finish  
 +  * Right click on the new project in Project Explorer ​-> Properties -> C/C++ Build -> Tool Chain Editor (if Project Explorer is not visible, go to Window -> Show View -> Project Explorer). 
 +  * Curent builder: "CMake Builder (portable)"​ 
 +  * Right click on the new project in Project Explorer -> Properties ​-> C/C++ Build 
 +  * Switch to Behavior tab. 
 +  * Check "​Enable parallel builds"​. 
 +  * Right click on the new project in Project Explorer -> Properties -> C/C++ General -> Preprocessor Include ...  
 +  * Switch to Providers tab 
 +  * check "​CMAKE_COMPILE_COMMANDS_JSON Parser"​ and "​CMAKE_COMPILE_COMMANDS_JSON Compiler Built-Ins"​ and uncheck others
  
 Now Mixxx should build within Eclipse with "Build Project"​ (Hammer icon). ​ Now Mixxx should build within Eclipse with "Build Project"​ (Hammer icon). ​
-The indexer should work after a full rebuild that allows Eclipse to parse all compiler arguments. 
   * Right click on the new project in Project Explorer -> Clean Project   * Right click on the new project in Project Explorer -> Clean Project
   * Right click on the new project in Project Explorer -> Build Project   * Right click on the new project in Project Explorer -> Build Project
eclipse.1554238777.txt.gz · Last modified: 2019/04/02 16:59 by beenisss