[英]compile c++ wxWidgets using Cygwin
I've downloaded wxWidgets package using Cygwin setup-x86_64 and NOT from wxWidgets site. 我已经使用Cygwin setup-x86_64下载了wxWidgets软件包,而不是从wxWidgets网站下载了该软件包。
I tried to compile the code from this site: http://docs.wxwidgets.org/stable/overview_helloworld.html 我试图从以下站点编译代码: http : //docs.wxwidgets.org/stable/overview_helloworld.html
Still, I am receiving these errors 不过,我仍然收到这些错误
fatal error: 'wx/wxprec.h' file not found
严重错误:找不到“ wx / wxprec.h”文件
fatal error: 'wx/wx.h' file
致命错误:“ wx / wx.h”文件
What should I do to get this package to work? 我应该怎么做才能使此软件包正常工作?
According to the list of files in the package, it seems that only /usr/x86_64-w64-mingw32/sys-root/mingw/bin/wx-config-3.0
is being installed by this package and not wx-config
itself (unless it's created dynamically during installation?). 根据软件包中的文件列表 ,似乎此软件包仅安装了
/usr/x86_64-w64-mingw32/sys-root/mingw/bin/wx-config-3.0
,而不是wx-config
本身(除非它是在安装过程中动态创建的?)。 If this is indeed the case, you will need to use wx-config-3.0 --cxxflags
etc on your command line to compile using it. 如果确实如此,则需要在命令行上使用
wx-config-3.0 --cxxflags
等进行编译。
Notice that you also need to use MinGW cross-compiler, ie i686-w64-mingw32-g++
or x86_64-w64-mingw32-g++
, depending on your target architecture, and not Cygwin g++
. 请注意,您还需要使用MinGW交叉编译器,即
i686-w64-mingw32-g++
或x86_64-w64-mingw32-g++
,而不是Cygwin g++
。
您是否添加了wx-config标志?
g++ $(wx-config --cxxflags) -o out *.cpp $(wx-config --libs)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.