Setting Up Linux Dev Environment?

slinga

Established Member
Hi all,

I'm interested in making an entry for the Saturn programming contest. What's the easiest way to get a dev environment setup on Linux? Jo Engine claims support for Linux, but it's not obvious to me how to use it. Any advice? Thanks in advance.
 
  • Like
Reactions: vbt
Sorry for the delayed reply. Yes I cloned the git repo:

git clone johannes-fetz/joengine

In /jo/joengine/Compiler/SH_NONE_ELF/bin there appears to be a compiler sh-none-elf-gcc-8.2.0. I think tried to compile a empty main file that includes jo/jo.h:

./sh-none-elf-gcc-8.2.0 main.c -I ~/jo/joengine/jo_engine

And that fails. Any advice? Thanks in advance.
 
Hi Antime,

The first errors are related to #defines:
Code:
error: #error "JO_FRAMERATE must be greater than zero"
error: #error "JO_FRAMERATE must be greater than zero"

At the command line I tried defining those two values:

Code:
./sh-none-elf-gcc-8.2.0 main.c -I ~/jo/joengine/jo_engine -DJO_FRAMERATE=30 -DJO_MAX_SPRITE=10

But now I get other errors:

Code:
jo/joengine/jo_engine/jo/sprites.h: In function 'jo_sprite_get_width':
jo/joengine/jo_engine/jo/sprites.h:369:39: error: 'jo_texture_definition' {aka 'struct <anonymous>'} has no member named 'width'
     return (__jo_sprite_def[sprite_id].width);

Lots of those. So not quite sure what's going on.
 
Thank you, it was embarrassingly simple. All I had to do was run "compile.sh" in one of the sample dirs.
 
Last edited:
  • Like
Reactions: vbt
Hi all,

I'm interested in making an entry for the Saturn programming contest. What's the easiest way to get a dev environment setup on Linux? Jo Engine claims support for Linux, but it's not obvious to me how to use it. Any advice? Thanks in advance.


Unfortunately there isn't a straight forward way. Each variant of Linux has a different system. Slackware is possibly easiest since you just write a .SlackBuild and let it compile the program; Slackware is pretty much a GNU BASH driven system so it's transparent to GNU Linux.

I'd recommend you make a .spec file for rpmbuild, for rpm based Linux variants. Or at least an Ebuild for Gentoo's Portage.
 
That's great things worked for you. Usually you want a sane resulting installable program so you can avoid git and keep track of installed software (e.g. deb, rpm, tbz2, txz, etc). Integrity keeps things transparent under Linux; Linux can be nasty against user preference.

EDIT:
You said any dev environment under Linux so not just Joengine? Consider "Codewarrior" version 4; this one and some others work in Linux.
 
Last edited:
Back
Top