SGDK CodeBlocks Linux
Moderator: Stef
-
- Newbie
- Posts: 7
- Joined: Tue May 21, 2019 2:59 am
- Location: Hong Kong
- Contact:
SGDK CodeBlocks Linux
I'm new to SGDK and trying to configure Codeblocks.
I found https://github.com/Stephane-D/SGDK/wiki ... CodeBlocks
but its quite "windows" specific :
Can anyone help me to setup the compiler ?
i have gendev installed at its default location : /opt/gendev
I found https://github.com/Stephane-D/SGDK/wiki ... CodeBlocks
but its quite "windows" specific :
Can anyone help me to setup the compiler ?
i have gendev installed at its default location : /opt/gendev
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Re: SGDK CodeBlocks Linux
Can't help with CodeBlocks, but I can help with Geany. Geany is a lighter editor... comparable to CodeLite. In Geany, go to the Build menu and select Set Build Commands. Then in the Independent Commands, for Make, set the command field to "export GENDEV=/opt/gendev; make -f $GENDEV/sgdk/mkfiles/makefile.gen clean all" (without the quotes). Set the working directory field to "%d" (without the quotes). Then in Execute Commands for Execute, set the command field to your favorite emulator. Then you build the project by loading any file in the main directory of the project and clicking the Brick icon in the toolbar. You'll get a printout of the results in the console window on the bottom of the Geany window. Once you've got it to build successfully, click the gears icon next to the brick to run the emulator. If your emulator accepts a command line option for the rom file, put that in the Execute command field with the path to the rom being "%d/out/rom.bin" (without the quotes). I just did this on my own system using gendev/examples/3d_example/main.c as the file loaded.
-
- Newbie
- Posts: 7
- Joined: Tue May 21, 2019 2:59 am
- Location: Hong Kong
- Contact:
Re: SGDK CodeBlocks Linux
Thank you !
I didn't know Geany, but i like it already
i have configured the build option as per your screenshot, but the compiler is unhappy.
i assume that i'm supposed to configure the "Compile/Build C commands" part as well,
but i see on your screenshot that you left the default gcc values...
I didn't know Geany, but i like it already
i have configured the build option as per your screenshot, but the compiler is unhappy.
i assume that i'm supposed to configure the "Compile/Build C commands" part as well,
but i see on your screenshot that you left the default gcc values...
Re: SGDK CodeBlocks Linux
I don't use Linux for SGDK development, but if it's anywhere similar to Windows, you should run the MAKE script, and not Compile or Build.
You might need to configure your IDE for include paths as well, if it has anything like Intellisense or Autocomplete.
You might need to configure your IDE for include paths as well, if it has anything like Intellisense or Autocomplete.
-
- Newbie
- Posts: 7
- Joined: Tue May 21, 2019 2:59 am
- Location: Hong Kong
- Contact:
Re: SGDK CodeBlocks Linux
ahhh right... stupid me, so that was it, it actually "make" just fine.
thanks for the clarification.
thanks for the clarification.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Re: SGDK CodeBlocks Linux
I was going to say, if the Build icon isn't working, click the triangle next to it and select Make All. After doing that once, clicking on Build did that afterwards. Technically, the only things I set were the Make and the Execute as they were all I needed for this. So you need to make sure you are Making and not GCCing.
Anywho, that was much easier to set that all the CodeBlocks stuff. I've always liked Geany. Been using it for about a decade now, and haven't found anything I like better. I used CodeBlocks before Geany, but it kept getting bigger and heavier, adding stuff I never used, and complicating everything I did until I got sick of it.
Anywho, that was much easier to set that all the CodeBlocks stuff. I've always liked Geany. Been using it for about a decade now, and haven't found anything I like better. I used CodeBlocks before Geany, but it kept getting bigger and heavier, adding stuff I never used, and complicating everything I did until I got sick of it.
-
- Newbie
- Posts: 7
- Joined: Tue May 21, 2019 2:59 am
- Location: Hong Kong
- Contact:
Re: SGDK CodeBlocks Linux
I just realised that i could use Sublimetext for my megadrive needs.
it's also very easy to setup.
for those who are interested, all you need to do is to create a .system-build file, like this one :
and hit Ctrl+B to build your project.
it's also very easy to setup.
for those who are interested, all you need to do is to create a .system-build file, like this one :
Code: Select all
{
"shell_cmd": "make -f /opt/gendev/sgdk/mkfiles/makefile.gen && gens out/rom.bin"
}
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Re: SGDK CodeBlocks Linux
My issue with sublime is the use of non-standard control keys. That was one of the things that drew me to Geany in the first place. This isn't the 1980s - key combos have been standardized for decades now.
-
- Newbie
- Posts: 7
- Joined: Tue May 21, 2019 2:59 am
- Location: Hong Kong
- Contact:
Re: SGDK CodeBlocks Linux
What key combos ? I'm probably missing something : )
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Re: SGDK CodeBlocks Linux
Well, right off the bat, Ctrl-P is not print. There are others...
While I'm not adverse to learning custom key mappings, to do so just for a text editor automatically gives it a strike.
While I'm not adverse to learning custom key mappings, to do so just for a text editor automatically gives it a strike.