我最近下载了 wxWidgets (从源码安装,但我不认为那是问题所在),但我不知道如何在 linux 上构建样本。据我所知,所有给定的makefile都是针对windows机器的,而且从我在网上找到的一些东西来看,只是说在目录中运行make,但这只是给我留下了一个
make: *** No targets specified and no makefile found. Stop.
我不知道如何建立它们。我试图构建的特定样本可以在这里找到。https:/github.comwxWidgetswxWidgetstreeWX_3_0_BRANCHsamplesminimal。
我使用的是wxwidgets版本:3.0.5, Ubuntu: 20.04,如果还需要其他信息,请直接询问。
不太清楚我是不是缺了什么东西做什么,有什么帮助就好了,谢谢。
EDIT: 我试着用make -f makefile.gcc来编译它们,得到了这个错误。
if not exist gcc_mswud mkdir gcc_mswud
make: -c: Command not found
make: [makefile.gcc:219: gcc_mswud] Error 127 (ignored)
windres --use-temp-file -i../../samples/sample.rc -ogcc_mswud\minimal_sample_rc.o --define __WXMSW__ --define _UNICODE --include-dir .\..\..\lib\gcc_lib\mswud --include-dir ./../../include --include-dir . --include-dir ./../../samples --define NOPCH
make: -c: Command not found
make: *** [makefile.gcc:234: gcc_mswud\minimal_sample_rc.o] Error 127
但据我所知,这是因为那个makefile是为Windows机器准备的。
你需要运行configure脚本来为你的系统生成make文件。 有一个很好的 wiki上的文章. configure脚本将生成库和样本的make文件。
在linux上,这个2个步骤的configuremake过程在构建库和程序时非常常见。