我一直在尝试使用CMake在Windows10上构建wxwidget3.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))有人知道如何应对吗?提前感谢!
发布于 2021-05-12 19:48:41
WxWidgets已经为你提供了makefile。你所需要做的就是使用它?:
cd WxWidgets-3.1.5\build\msw
mingw32-bin.exe -f makefile.gcc BUILD=debughttps://stackoverflow.com/questions/67496624
复制相似问题