idea4good / GuiLite

✔️The smallest header-only GUI library(4 KLOC) for all platforms
https://www.youtube.com/watch?v=grqXEz3bdC0
Apache License 2.0
7.42k stars 804 forks source link

mingw gcc 8.1 building error #17

Closed khan-lau closed 5 years ago

khan-lau commented 5 years ago

[ 28%] Building CXX object core/CMakeFiles/core.dir/src/wave_ctrl.cpp.obj D:\Users\Administrator\Downloads\GuiLite-master\core\src\wave_ctrl.cpp: In member function 'void c_wave_ctrl::refresh_wa ve(unsigned char)': D:\Users\Administrator\Downloads\GuiLite-master\core\src\wave_ctrl.cpp:136:49: error: cast from 'c_wave_ctrl*' to 'long unsigned int' loses precision [-fpermissive] (frame | (speed << 8) | (((unsigned long)this & 0xffff) << 16))); ^~~~ make[2]: [core\CMakeFiles\core.dir\build.make:147: core/CMakeFiles/core.dir/src/wave_ctrl.cpp.obj] Error 1 make[1]: [CMakeFiles\Makefile2:90: core/CMakeFiles/core.dir/all] Error 2

idea4good commented 5 years ago

嗯,需要加上一个编译选项-fpermissive

如果想尽快编译通过,请选择其他编译器,比如纯linux环境下的编译器