Description
I'm trying to build Io on windows with mingw64, I'm not familiar with mingw but I managed to get it installed and in the path (I think), but when running mingw32-make
I get the following error:
In file included from C:\Users\Niv\Downloads\io\libs\basekit\source\CHash.c:10:0:
c:\mingw\include\stdio.h:345:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__mingw__snprintf'
extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...);
^
libs\basekit\CMakeFiles\basekit.dir\build.make:105: recipe for target 'libs/basekit/CMakeFiles/basekit.dir/source/CHash.c.obj' failed
I assumed it's a mingw64 issue and I found this SO question, and applied this patch linked from it, which got me through the error above, only to run into this error:
C:\Users\Niv\Downloads\io\libs\basekit\source\DynLib.c: In function 'dlopen':
C:\Users\Niv\Downloads\io\libs\basekit\source\DynLib.c:26:22: error: 'ERROR_SUCCESS' undeclared (first use in this function)
SetLastError(ERROR_SUCCESS);
^~~~~~~~~~~~~
C:\Users\Niv\Downloads\io\libs\basekit\source\DynLib.c:26:22: note: each undeclared identifier is reported only once for each function it appears in
C:\Users\Niv\Downloads\io\libs\basekit\source\DynLib.c: In function 'dlerror':
C:\Users\Niv\Downloads\io\libs\basekit\source\DynLib.c:39:16: error: 'ERROR_SUCCESS' undeclared (first use in this function)
if (err == ERROR_SUCCESS)
^~~~~~~~~~~~~
libs\basekit\CMakeFiles\basekit.dir\build.make:165: recipe for target 'libs/basekit/CMakeFiles/basekit.dir/source/DynLib.c.obj' failed
which I can't find a solution to, so I've come here for help.
Maybe a specific version of mingw64 is required? or some other environment setting, I can see the CI builds succesfuly, so I don't know what's wrong with my setup.
It's probably worth noting that I also downloaded the build artifacts from the CI (by forking and running the CI action in my account, and taking the binary files from there), and that worked well, but then I ran in to the same compile error when installing eerie, when it tries to compile the Markdown addon, and since most of the addons don't ship binaries, it seems I need to solve it no matter what.
I appreciate any help solving this