I successfully added a new build target to PokittoLib on EmBitz as it is shown in this tutorial. At the beginning it worked fine. But after same changes in the code, there are errors shown when compiling the project on EmBitz. The compiling on Code Blocks works fine and there aren’t any errors shown up when using the simulator. But I can’t create a .bin file with EmBitz. Two things I added were:
using namespace std;
I also added a picture showing the errors that show up when trying to build on EmBitz.
Thanks in advance!
This is an annoying side effect of Pokitto’s Arduino support.
You need to add
#define DISABLEAVRMIN before you include
The problem comes from a conflict between the C++ library’s
std:max which are template functions and the Arduino library’s
max which are macros, and thus suffer from macro poisoning (a.k.a. macro bleed).
Essentially the macro versions end up everywhere so it’s upsetting the code that’s trying to use
One of my proposals for the future of the Pokitto library tackles exactly this problem
Thanks, that solved my issue! ^^