构建 wxwidget 时遇到问题
Trouble building wxwidget
我一直在尝试使用 CMake 在 Windows10 上构建 wxwidget 3.1.5。
我简单的使用了官网推荐的命令:
cmake -G "MinGW Makefiles" ..\wxWidgets-3.1.5\ -DwxBUILD_TESTS=ALL
cmake --build .
一直很顺利,直到弹出一条消息
[100%] Building CXX object tests/headers/CMakeFiles/test_headers.dir/__/__/__/__/tests/allheaders.cpp.obj
In file included from D:/tools/wxwidget/wxWidgets-3.1.5/include/wx/platform.h:343,
from D:/tools/wxwidget/wxWidgets-3.1.5/include/wx/defs.h:45,
from D:/tools/wxwidget/wxWidgets-3.1.5/include/wx/wxprec.h:12,
from D:\tools\wxwidget\wxWidgets-3.1.5\tests\testprec.h:4,
from D:\tools\wxwidget\wxWidgets-3.1.5\tests\allheaders.cpp:433:
D:/tools/wxwidget/wxWidgets-3.1.5/include/wx/wxcrtbase.h:228:39: error: redundant redeclaration of 'size_t wcsnlen(const wchar_t*, size_t)' in same scope [-Werror=redundant-decls]
228 | wxDECL_FOR_MINGW32_ALWAYS(size_t, wcsnlen, (const wchar_t*, size_t))
有人知道怎么处理吗?提前致谢!
WxWidgets 已经为您提供了 makefile。您需要做的就是使用它:
cd WxWidgets-3.1.5\build\msw
mingw32-bin.exe -f makefile.gcc BUILD=debug
我一直在尝试使用 CMake 在 Windows10 上构建 wxwidget 3.1.5。
我简单的使用了官网推荐的命令:
cmake -G "MinGW Makefiles" ..\wxWidgets-3.1.5\ -DwxBUILD_TESTS=ALL
cmake --build .
一直很顺利,直到弹出一条消息
[100%] Building CXX object tests/headers/CMakeFiles/test_headers.dir/__/__/__/__/tests/allheaders.cpp.obj
In file included from D:/tools/wxwidget/wxWidgets-3.1.5/include/wx/platform.h:343,
from D:/tools/wxwidget/wxWidgets-3.1.5/include/wx/defs.h:45,
from D:/tools/wxwidget/wxWidgets-3.1.5/include/wx/wxprec.h:12,
from D:\tools\wxwidget\wxWidgets-3.1.5\tests\testprec.h:4,
from D:\tools\wxwidget\wxWidgets-3.1.5\tests\allheaders.cpp:433:
D:/tools/wxwidget/wxWidgets-3.1.5/include/wx/wxcrtbase.h:228:39: error: redundant redeclaration of 'size_t wcsnlen(const wchar_t*, size_t)' in same scope [-Werror=redundant-decls]
228 | wxDECL_FOR_MINGW32_ALWAYS(size_t, wcsnlen, (const wchar_t*, size_t))
有人知道怎么处理吗?提前致谢!
WxWidgets 已经为您提供了 makefile。您需要做的就是使用它:
cd WxWidgets-3.1.5\build\msw
mingw32-bin.exe -f makefile.gcc BUILD=debug