【问题标题】:How do you build wxWidgets samples on linux如何在 linux 上构建 wxWidgets 示例
【发布时间】:2020-08-31 03:40:39
【问题描述】:

我最近下载了 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 机器设计的

【问题讨论】:

    标签: c++ linux build wxwidgets


    【解决方案1】:

    您需要运行配置脚本来为您的系统生成 make 文件。有一个很好的article on this on the wiki。配置脚本将为库和示例生成 make 文件。

    在 linux 上,这 2 步配置/制作过程对于构建库和程序非常常见。

    【讨论】:

    • 没想到build目录下也有samples文件夹,谢谢大家的帮助
    猜你喜欢
    • 2014-09-16
    • 2010-09-16
    • 2020-10-24
    • 1970-01-01
    • 2012-02-02
    • 2017-02-13
    • 1970-01-01
    • 2023-03-03
    • 1970-01-01
    相关资源
    最近更新 更多