Reviewing and fixing mingw32 and mingw64 builds
The mingw32 builds configured with the GitLab CI are currently failing: https://gitlab.com/osslugaru/lugaru/builds/6178851 I can also reproduce the same issue on Mageia 6 x86_64 with the same toolchain.
We should fix the mingw32 build issues ASAP so that we can start testing Windows binaries too.
The current build errors are:
[ 20%] Building CXX object CMakeFiles/lugaru.dir/Source/Input.cpp.obj
In file included from /builds/osslugaru/lugaru/Dependencies/libjpeg/jpeglib.h:27:0,
from /builds/osslugaru/lugaru/Source/OpenGL_Windows.cpp:41:
/builds/osslugaru/lugaru/Dependencies/libjpeg/jmorecfg.h:141:15: error: conflicting declaration 'typedef short int UINT8'
typedef short UINT8;
^~~~~
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:143:0,
from /usr/i686-w64-mingw32/sys-root/mingw/include/minwindef.h:163,
from /usr/i686-w64-mingw32/sys-root/mingw/include/windef.h:8,
from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:69,
from /builds/osslugaru/lugaru/Source/TGALoader.h:37,
from /builds/osslugaru/lugaru/Source/Game.h:41,
from /builds/osslugaru/lugaru/Source/OpenGL_Windows.cpp:35:
/usr/i686-w64-mingw32/sys-root/mingw/include/basetsd.h:33:25: note: previous declaration as 'typedef unsigned char UINT8'
typedef unsigned char UINT8,*PUINT8;
^~~~~
In file included from /builds/osslugaru/lugaru/Dependencies/libjpeg/jpeglib.h:27:0,
from /builds/osslugaru/lugaru/Source/OpenGL_Windows.cpp:41:
/builds/osslugaru/lugaru/Dependencies/libjpeg/jmorecfg.h:150:22: error: conflicting declaration 'typedef unsigned int UINT16'
typedef unsigned int UINT16;
^~~~~~
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/winnt.h:143:0,
from /usr/i686-w64-mingw32/sys-root/mingw/include/minwindef.h:163,
from /usr/i686-w64-mingw32/sys-root/mingw/include/windef.h:8,
from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:69,
from /builds/osslugaru/lugaru/Source/TGALoader.h:37,
from /builds/osslugaru/lugaru/Source/Game.h:41,
from /builds/osslugaru/lugaru/Source/OpenGL_Windows.cpp:35:
/usr/i686-w64-mingw32/sys-root/mingw/include/basetsd.h:34:26: note: previous declaration as 'typedef short unsigned int UINT16'
typedef unsigned short UINT16,*PUINT16;
^~~~~~
and:
/builds/osslugaru/lugaru/Source/OpenGL_Windows.cpp: In function 'bool cmdline(const char*)':
/builds/osslugaru/lugaru/Source/OpenGL_Windows.cpp:173:25: error: '_argc' was not declared in this scope
for (int i = 1; i < _argc; i++) {
^~~~~
/builds/osslugaru/lugaru/Source/OpenGL_Windows.cpp:174:21: error: '_argv' was not declared in this scope
char *arg = _argv[i];
^~~~~
The might be other errors that will show up once these ones are fixed.