Skip to content

Setup SGDK with Eclipse

Stephane Dallongeville edited this page May 8, 2015 · 3 revisions
  • Here's how to use the devkit with Eclipse CDT IDE*

Table of Contents

Setup your files

Download Eclipse CDT at http://www.eclipse.org/cdt/downloads.php

 * Create a directory for Genesis development only, *without* space or special chars
 * Unzip EclipseCDT and SGDK there
 * Rename SGDK's one as "_sdk_" 
 * Create an other directory called "_projects_".

In the end, you have

Setup Eclipse

Launch Eclipse and type _../../projects_ as workspace folder

Go to the workbench and select menu _Window > Preferences_ to setup Eclipse

In _General > Workspace_, select _*Save automatically before build*_ and unselect _*Build automatically*_

In _C/C++ > Build > Build Variables_, add a new variable :

 * Variable name : _GDK_
 * Type : _Directory_
 * Value : _../../sdk_

http://sgdk.googlecode.com/svn/wiki/pictures/eclipse01.png

In _C/C++ > Build > Environnement_, add a new variable





http://sgdk.googlecode.com/svn/wiki/pictures/eclipse02.png

In _C/C++ > New CDT Project Wizard > Makefile Project_

 * unselect _*Use default build command*_ in _Builder Settings_ tab
 * set, as _Build command_,  `${GDK}/bin/make -f ${GDK}/makefile.gen`

http://sgdk.googlecode.com/svn/wiki/pictures/eclipse03.png

Setup Project

You could now create a new project (_File > New > C Project > Makefile project > Empty Project > --Other toolchain--_).

http://sgdk.googlecode.com/svn/wiki/pictures/eclipse04.png

Right-click on it and select _Properties_ to setup the project itself.

In _C/C++ General > Paths and Symbols_, add a new directory in _Includes_ tab



http://sgdk.googlecode.com/svn/wiki/pictures/eclipse05.png

Click _Apply_ and rebuild the index

http://sgdk.googlecode.com/svn/wiki/pictures/eclipse06.jpg

On _Make Target_ view, create a new target for your project.

 * give it a name
 * unselect _*Same as the target name*_
 * empty _Make target_ field

http://sgdk.googlecode.com/svn/wiki/pictures/eclipse07.png

Common error

If you have an error on build like *`main() not found`*, be sure to click _*Apply*_ on project properties's _C/C++ General > Paths and Symbols_.

Another source of problem : be sure to un-mark _Project>Build automatically_

Clone this wiki locally