[OBSOLETE Tutorial][Advanced]1.Programming Pokitto "offline" using EmBitz IDE

Using a desktop github client is completely optional.
Personally I manage all my github submissions and retrievals from the webpage.

There are a few rare exceptions where I use portable git because I want to do something drastic (i.e. change the commit history).


To use the examples all you have to do is grab the latest copy of the library from the PokittoLib repo on github, unzip it and use EmBitz to open the .ebp file.

From there, each example is a different ‘build target’, which you have to switch between to compile them.
The source code for the examples is in the ‘Examples’ folder and compiled examples end up in the ‘build’ folder.
Each example has its own build settings because each one is a different build target.

(I’m not sure about adding new build targets sadly, I haven’t got round to sorting all that out yet.)

Step3: “Open HelloWorld.epb”. I cloned the library but can’t find the HelloWorld.epb file…

Not sure if that’s a typo or if it’s out of date.
It should say “PokittoEmBitz.ebp”. (I’ll fix that momentarily.)
.epb is an EmBitz project file.


Edit:
I also updated the picture.
From the previous picture it’s evident that there once was a HelloWorld.epb but this tutorial just wasn’t updated when the name changed.

@zer0 Thanks for bringing the issue up.

1 Like

How do I add an new program to the pokittoEmBitz? I have my .cpp and .h files.

It would be easier to just modify the hello world example for now.
I.e. just dump all your files in the hello world example folder and replace the hello world main with your main.

(That’s what I did for developing Noughts And Crosses and it worked fine.)

You’ll also need to use the UI to include them and assign them to the hello world build target. You can do that by right clicking on ‘examples’ in the file explorer and choosing ‘include recursive’ then picking the hello world folder (after copying your files over to it).


I’ll try to find some time to type up a tutorial on how to add a new build target.

2 Likes

I’m a skull of my word:

2 Likes

I downloaded PokittoLib and EmBitz and so far it is looking good. The tracker is selected as a target in the current project file and it compiles fine. However, if I change the target, for instance to “Hello World.cpp” I get an error:

||=== PokittoEmBitz, HelloWorld ===|
[...]
\PokittoLib-master\Pokitto\POKITTO_CORE\PokittoSound.cpp|815|undefined reference to `Pokitto::setHWvolume(unsigned char)'|
||=== Build finished: 1 errors, 134 warnings (0 minutes, 19 seconds) ===|

Do I have to change something in the setup when I select a different target?

Just a sec

1 Like

Fixing it right now

2 Likes

#fixed

@gho , please go and fetch the latest version

Thanks! Going to try it out and will report back.

1 Like

Thanks again! Now it works!

2 Likes

I downloaded the IDE from the mirrored link,
downloaded PokittoLib and Examples (not mentioned in step 2) from GitHub and followed the remaining steps mentioned. But I think I’m missing something. After clicking (re)build. I get a bunch of inline variable errors in Pokitto_settings.h. Can someone tell me what I’m missing /doing wrong ?

Looks like you don’t have GCC set to C++17.

Thanks for the response @FManga I saw at C++flags under build options there is a line -std=c++17. Do I need to check another option?

1 Like

AFAIK, that’s all there is to it, though take that with a grain of salt since I don’t use EmBitz.
What project does it fail to compile?

The hello word example. The inline errors are in PokittoLib files though. Maybe the PokittoLib advanced while this IDE didn’t?

I also had a go at the Femto IDE and but discovered the GCC binaries are 64-bit only (my main PC is still 32-bit) :joy:

1 Like

cries in aarch64
I understand :sweat_smile:

1 Like

Ah, now I remember: The version of GCC that comes with EmBitz was ancient and didn’t support C++17. If you download the latest one you’ll be able to get either EmBitz or FemtoIDE to work.