你如何在 linux 上构建 wxWidgets 示例
How do you build wxWidgets samples on linux
我最近下载了 wxWidgets(从源代码安装,但我认为这不是问题所在),但我不知道如何构建 linux 上提供的示例。据我所知,所有给出的 makefile 都是针对 windows 机器的,而从我在网上找到的一些东西中,只需在目录中对 运行 make 说,但这只会给我留下
make: *** No targets specified and no makefile found. Stop.
我不知道如何构建它们。我正在尝试构建的特定示例可以在这里找到:
https://github.com/wxWidgets/wxWidgets/tree/WX_3_0_BRANCH/samples/minimal
并且我使用的是 wxwidgets 版本:3.0.5,Ubuntu:20.04
,如果需要任何其他信息,请询问
不太确定我是否只是遗漏了什么,任何帮助都会很好,谢谢
编辑:我也尝试使用 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 台机器
您需要运行 配置脚本来为您的系统生成生成文件。有个不错的article on this on the wiki。配置脚本将为库和示例生成生成文件。
在 linux,这个 2 步 configure/make 过程对于构建库和程序来说非常普遍。
我最近下载了 wxWidgets(从源代码安装,但我认为这不是问题所在),但我不知道如何构建 linux 上提供的示例。据我所知,所有给出的 makefile 都是针对 windows 机器的,而从我在网上找到的一些东西中,只需在目录中对 运行 make 说,但这只会给我留下
make: *** No targets specified and no makefile found. Stop.
我不知道如何构建它们。我正在尝试构建的特定示例可以在这里找到: https://github.com/wxWidgets/wxWidgets/tree/WX_3_0_BRANCH/samples/minimal
并且我使用的是 wxwidgets 版本:3.0.5,Ubuntu:20.04 ,如果需要任何其他信息,请询问
不太确定我是否只是遗漏了什么,任何帮助都会很好,谢谢
编辑:我也尝试使用 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 台机器
您需要运行 配置脚本来为您的系统生成生成文件。有个不错的article on this on the wiki。配置脚本将为库和示例生成生成文件。
在 linux,这个 2 步 configure/make 过程对于构建库和程序来说非常普遍。