麻烦使用wxWidgets 3.0.2库下Mingw 64 [英] Trouble using wxWidgets 3.0.2 library under Mingw 64

查看:293
本文介绍了麻烦使用wxWidgets 3.0.2库下Mingw 64的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我编译wxWidgets库的方法。

Here's how I compiled wxWidgets libraries.

下载 https://sourceforge.net/projects/wxwindows/files/3.0.2/wxMSW-Setup-3.0.2.exe

set path=%MINGW%\bin
cd D:\wxWidgets-3.0.2\build\msw

mingw32-make -f makefile.gcc CFG=64 CXXFLAGS=-std=c++11 BUILD=debug UNICODE=1 MONOLITHIC=1
mingw32-make -f makefile.gcc CFG=64 CXXFLAGS=-std=c++11 BUILD=release UNICODE=1 MONOLITHIC=1

无法将我的测试程序与新建的库关联。

Not able to link my test program with new libraries built.

D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_filename.o): In function `wxChmod(wxString const&, unsigned short)':
D:\wxWidgets-3.0.2\build\msw/../../include/wx/filefn.h:513: undefined reference to `wxMSLU__wchmod(wchar_t const*, int)'
D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_filename.o): In function `wxOpen(wxString const&, int, unsigned short)':
D:\wxWidgets-3.0.2\build\msw/../../include/wx/filefn.h:515: undefined reference to `wxMSLU__wopen(wchar_t const*, int, int)'
D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_file.o): In function `wxRemove(wxString const&)':
D:\wxWidgets-3.0.2\build\msw/../../include/wx/wxcrt.h:758: undefined reference to `wxMSLU__wremove(wchar_t const*)'
D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_file.o): In function `wxAccess(wxString const&, unsigned short)':
D:\wxWidgets-3.0.2\build\msw/../../include/wx/filefn.h:511: undefined reference to `wxMSLU__waccess(wchar_t const*, int)'
D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_filefn.o): In function `wxRename(wxString const&, wxString const&)':
D:\wxWidgets-3.0.2\build\msw/../../include/wx/wxcrt.h:760: undefined reference to `wxMSLU__wrename(wchar_t const*, wchar_t const*)'
D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_filefn.o): In function `wxRmDir(wxString const&)':
D:\wxWidgets-3.0.2\build\msw/../../include/wx/filefn.h:524: undefined reference to `wxMSLU__wrmdir(wchar_t const*)'
D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_filefn.o): In function `wxMkDir(wxString const&, unsigned short)':
D:\wxWidgets-3.0.2\build\msw/../../include/wx/filefn.h:528: undefined reference to `wxMSLU__wmkdir(wchar_t const*)'
D:\wxWidgets-3.0.2\lib\gcc_lib64/libwxmsw30ud.a(monolib_ffile.o): In function `wxFopen(wxString const&, wxString const&)':
D:\wxWidgets-3.0.2\build\msw/../../include/wx/wxcrt.h:754: undefined reference to `wxMSLU__wfopen(wchar_t const*, wchar_t const*)'

我在这里做错了什么。

What am I doing wrong here. Do you see any problem with the way libraries are built.

推荐答案

最后,我想出了如何使用MingW Drangon 64构建WxWidgets位

Finally, I figured out how to build WxWidgets with MingW Drangon 64 bit.

您不应将 CXX 标志设置为 -std = c ++ 11

注意,我在WxWidgets文件夹中找到。有我的问题!

Here's note that I found in WxWidgets folder. There lies my problem!


C ++ 11注意:如果你想在C ++ 11模式下编译wxWidgets, b目前有
使用-std = gnu ++ 11切换为-std = c ++ 11禁用wxWidgets依赖的一些扩展
。也就是说请使用CXXFLAGS = - std = gnu ++ 11。

C++11 note: If you want to compile wxWidgets in C++11 mode, you currently have to use -std=gnu++11 switch as -std=c++11 disables some extensions that wxWidgets relies on. I.e. please use CXXFLAGS="-std=gnu++11".

下载 https://sourceforge.net/projects/wxwindows/files/3.0.2/wxMSW-Setup-3.0 .2.exe

set path=C:\mingw64\bin
cd C:\wxWidgets-3.0.2\build\msw

mingw32-make -f makefile.gcc CXXFLAGS="-std=gnu++11" BUILD=debug UNICODE=1 SHARED=1
mingw32-make -f makefile.gcc CXXFLAGS="-std=gnu++11" BUILD=release UNICODE=1 SHARED=1
mingw32-make -f makefile.gcc CXXFLAGS="-std=gnu++11" BUILD=debug UNICODE=1 SHARED=0
mingw32-make -f makefile.gcc CXXFLAGS="-std=gnu++11" BUILD=release UNICODE=1 SHARED=0

这篇关于麻烦使用wxWidgets 3.0.2库下Mingw 64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆