I take it you’re trying to get one of your Arduboy games running?
If so which one(s)?
It might not run because the version of Arduboy2 packaged in Arduboy2Lib is out-of-date.
stl_algobase is a system file used to implement the standard library. @Xhaku can’t alter that or they risk upsetting the standard library in general,
possibly causing knock-on effects with other games/programs.
This is the general answer, but it also depends on the program being compiled.
If that program needs the macro form of min and max then disabling the AVR compatibility will cause problems,
but at the same time not disabling it will prevent the algorithm standard header from compiling.
So basically it’s a bit of a ‘catch-22’ so we might need more details if using #define DISABLEAVRMIN doesn’t work.
(In particular, where and why is #include <algorithm> occurring.)
I put #define DISABLEAVRMIN into My_settings.h for the built in hello world example and it works.
This solution doesent work for 101Starships_GB. I either get the same error or a new error where it says that min is not defined
Looks like the problem is that MinGW’s version of GCC 6.3.0’s version of the standard library is including algorithm in its stdint.h implementation for some reason.
‘Legally’ that’s permitted, but rather awkward.
Checking my version of Code::Blocks, it seems I’ve got it set it to use 4.9.2 and that doesn’t seem to be causing me issues.
@jonne, what version of GCC is your Code::Blocks using?
That’s exactly the ‘catch-22’ situation I mentioned earlier.
One way to fix that is to #define DISABLEAVRMIN in My_settings.h, and then at the top of the main file for 101Starships_GB (which I’m assuming is called main.cpp), make sure you #include <Pokitto.h> first, and then right after that put:
While reading through the build log I noticed these three warnings:
C:UsersFlorimDesktopPokittoLib-masterPokittoLib-masterPokittoPOKITTO_COREPokittoCookie.cpp||In member function 'bool Pokitto::Cookie::saveCookie()':|
C:UsersFlorimDesktopPokittoLib-masterPokittoLib-masterPokittoPOKITTO_COREPokittoCookie.cpp|129|warning: control reaches end of non-void function [-Wreturn-type]|
C:UsersFlorimDesktopPokittoLib-masterPokittoLib-masterPokittoPOKITTO_COREPokittoCookie.cpp||In member function 'bool Pokitto::Cookie::loadCookie()':|
C:UsersFlorimDesktopPokittoLib-masterPokittoLib-masterPokittoPOKITTO_COREPokittoCookie.cpp|138|warning: control reaches end of non-void function [-Wreturn-type]|
C:UsersFlorimDesktopPokittoLib-masterPokittoLib-masterPokittoPOKITTO_COREPokittoCookie.cpp||In member function 'int Pokitto::Cookie::findMyNextBlock()':|
C:UsersFlorimDesktopPokittoLib-masterPokittoLib-masterPokittoPOKITTO_COREPokittoCookie.cpp|361|warning: control reaches end of non-void function [-Wreturn-type]|
I don’t like warnings and these are potentially serious issues, so I made a PR to fix them:
i have removed the other compiler and installed 4.9.2.
The min max problem is gone however now i get another error.
I am trying to build the hello world example from the pokitto simlator.
Maybe you could take a look at it?
The problem seems to be this line
C:\Users\Florim\Desktop\PokittoLib-master\PokittoLib-master\Pokitto\POKITTO_CORE\PokittoConsole.cpp|83|error: cast from ‘char*’ to ‘uint32_t {aka unsigned int}’ loses precision [-fpermissive]|
I’m guessing that’s because you’re compiling for a 64 bit CPU/OS so a pointer is 64 bits.
I’ll make a PR to the library tomorrow to fix that.
In the meantime you can try to set the compiler to compile a 32-bit program or you can pass the -fpermissive flag to the compiler through the build settings.
(And if you don’t know how to do either of those, I’ll tell you tomorrow.)
i have tried to add -fpermissive which got rid of the error but then i got other errors which i think were also 64bit related so i removed the compiler again and installed the 32bit compiler.
Now everything seems to be working.
Thank you and Jonne for your help cant wait to get into the Pokitto especially the color display
Thanks I actually bought the Pokitto because of you. I was checking out your raycastLib and saw a gif of an example on the Pokitto. For some reason that was enough for me to buy it.
This means very much to me, I’m really very happy you liked it so much.
Until the Pokitto arrives, also try out the emulator:
I now prefer it to the simulator for the development because it behaves more like the actual hardware. I still use the simulator for debugging (with that you can normally print to console, use valgrind on the executable etc.).