Colobot Forum - International Colobot Community
[error] Can't compile Colobot on MSYS2 - Printable Version

+- Colobot Forum - International Colobot Community (https://colobot.info/forum)
+-- Forum: [Archive] New forum (2015-2019) (https://colobot.info/forum/forumdisplay.php?fid=76)
+--- Forum: Colobot: Gold Edition Development (https://colobot.info/forum/forumdisplay.php?fid=62)
+---- Forum: Game Engine & General Talk (https://colobot.info/forum/forumdisplay.php?fid=63)
+---- Thread: [error] Can't compile Colobot on MSYS2 (/showthread.php?tid=721)



[error] Can't compile Colobot on MSYS2 - ivanovmv - 02-11-2016

First of all i read these articles Compiling GOLD on Windows with MSYS2 and Compiling on Linux and configure MSYS2 according to them.
Latest MSYS2 with this packages installed

Code:
mingw-w64-x86_64-toolchain
msys2-devel
git
make
wget
mingw-w64-x86_64-doxygen
mingw-w64-x86_64-cmake
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
mingw-w64-x86_64-boost
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-SDL2_image
mingw-w64-x86_64-SDL2_ttf
mingw-w64-x86_64-glew
mingw-w64-x86_64-libpng
mingw-w64-x86_64-gettext
mingw-w64-x86_64-libsndfile
mingw-w64-x86_64-libvorbis
mingw-w64-x86_64-libogg
mingw-w64-x86_64-openal
mingw-w64-x86_64-physfs
The only packages i found missing is po4a and oggenc. According to this post Compilating translations po4a no longer required.
I'm using sources form latest dev branch and running cmake with these parameters:

Code:
cmake -DCMAKE_BUILD_TYPE=Debug -DDEV_BUILD=1 -DCMAKE_INSTALL_PREFIX=/c/tmp -G"MSYS Makefiles"
cmake goes well without errors
but make  failed with error

Code:
$ make
[  0%] Building C object lib/localename/CMakeFiles/localename.dir/localename.c.obj
[  0%] Linking C static library liblocalename.a
[  0%] Built target localename
[  0%] Building CXX object src/CBot/CMakeFiles/CBot.dir/CBotCallMethode.cpp.obj
[  0%] Building CXX object src/CBot/CMakeFiles/CBot.dir/CBotClass.cpp.obj
[  0%] Building CXX object src/CBot/CMakeFiles/CBot.dir/CBotCStack.cpp.obj
[  0%] Building CXX object src/CBot/CMakeFiles/CBot.dir/CBotDebug.cpp.obj
C:/path/to/sources/colobot/src/CBot/CBotDebug.cpp: In function 'std::__cxx11::string CBot::{anonymous}::GetPointerAsString(void*)':
C:/path/to/sources/colobot/src/CBot/CBotDebug.cpp:39:71: error: cast from 'void*' to 'long unsigned int' loses precision [-fpermissive]
    sprintf(buffer, "instr%016lX", reinterpret_cast<unsigned long>(ptr));
                                                                      ^
src/CBot/CMakeFiles/CBot.dir/build.make:134: recipe for target 'src/CBot/CMakeFiles/CBot.dir/CBotDebug.cpp.obj' failed
make[2]: *** [src/CBot/CMakeFiles/CBot.dir/CBotDebug.cpp.obj] Error 1
CMakeFiles/Makefile2:241: recipe for target 'src/CBot/CMakeFiles/CBot.dir/all' failed
make[1]: *** [src/CBot/CMakeFiles/CBot.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
Help me understand what goes wrong or maybe it's a bug in sources?


RE: [error] Can't compile Colobot on MSYS2 - krzys_h - 02-11-2016

Looks like a bug in sources, I have not tried compiling latest dev on MSYS2 yet. Will be fixed soon, but as a workaround you can just comment out the line that fails the compilation. It is not used anywhere outside of some debugging tools external to the game, so it should not break anything.


RE: [error] Can't compile Colobot on MSYS2 - ivanovmv - 02-11-2016

(02-11-2016, 08:56 PM)krzys_h Wrote: Looks like a bug in sources, I have not tried compiling latest dev on MSYS2 yet. Will be fixed soon, but as a workaround you can just comment out the line that fails the compilation. It is not used anywhere outside of some debugging tools external to the game, so it should not break anything.
Thanks for help. Successfully compiled latest dev.
But can't run it because of this:
[attachment=196]
[attachment=197]
It seems like colobot uses wrong renderer "GDI Generic" which is support only OpenGL 1.1 features
While installed driver can handle up to OpenGL 3.1
Should i report this on github or it is problem with my OS/driver?

Edit: Just successfully run tests on all OpenGL version from 1.1 to 3.1 without errors using GLview utility.


RE: [error] Can't compile Colobot on MSYS2 - tomaszkax86 - 02-11-2016

Do you have Windows 10? We heard about some problems in games that use OpenGL on Windows 10. For some reason it only gives you generic software renderer limited to OpenGL 1.1. It's probably some problem related to context creation but we don't know for sure.


RE: [error] Can't compile Colobot on MSYS2 - ivanovmv - 02-11-2016

Yes, Win 10 x64 with Intel HD 3000 so it can be GPU driver as well since Intel does not ship Windows 10 drivers for 2nd generation Core IGPU
BTW this GLview utility shows me 4 available OpenGL context and tests run well in any of them.
[attachment=198]
Here you can find GLview official website may be it can help.