-
-
Notifications
You must be signed in to change notification settings - Fork 196
Setup SGDK with Eclipse (old)
Here's how to use the devkit with Eclipse CDT IDE
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
<parent folder>
->eclipse folder
->sdk folder
->projects folder
Don't forget to add SGDK's bin folder in your Windows PATH
For XP, see tutorial at http://roy.vanegas.org/teaching/c/modifying_windows_path_for_gcc.html
For 7, open control panel > system, select advanded system parameters and jump to step 4 of above tutorial
IMPORTANT : Be sure to use slash "/" to define any folder else make will fail
Launch Eclipse and select /projects as workspace folder
each new project will be added to this folder by Eclipse
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 : (browse to /sdk)
this will define $GDK needed by sdk/makefile.gen
In C/C++ > Build > Environnement, add a new variable
- Name : GDK
- Value : (full path to /sdk)
this will define a var used on Eclipse IDE
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
this will define sdk/makefile.gen as the default makefile of any project
You could now create a new project (File > New > C Project).
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
- Directory :
${GDK}/include
- Add to all configurations
- Add to all languages
Click Apply and rebuild the index
this will make available the headers on <parent folder>/sdk/include to your project
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
double click on this target to generate a out/rom.bin according your project's file, sdk/makefile.gen and sgdk library
If you want to launch the rom on Gens from Eclipse
- Right click on the generated out/rom.bin.
- Select Open With > Others...
- Browse for gens.exe on External programs tab
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
And be sure to use slash "/" !!