【问题标题】:How to install FLTK on windows?如何在 Windows 上安装 FLTK?
【发布时间】:2021-07-07 11:11:57
【问题描述】:

我正在尝试安装 FLTK,但每次我收到此错误并且找不到合适的解决方案。我已经安装了 Chocolatey 和 make。

PS D:\My C & C++ programs\C++ programs\FLTK\fltk-1.3.6> make
if test -f config.status; then \
        ./config.status --recheck; \
        ./config.status; \
else \
        ./configure; \
fi
-f was unexpected at this time.
Makefile:17: makeinclude: No such file or directory
make: *** [Makefile:95: makeinclude] Error 255

【问题讨论】:

    标签: c++ powershell visual-studio-code chocolatey fltk


    【解决方案1】:

    FLTK 使用 CMake 作为构建系统生成器。 makefile 只是为了方便调用配置(在 Windows* 上支持有限的自动工具的一部分)。同样,make 在 Windows* 上的支持有限。 要构建,您需要安装 CMake 然后运行:

    cmake -B bin -S .
    cmake --build bin
    

    这将在新创建的 bin 文件夹中输出库。实际结构取决于 CMake 是否使用了 Visual Studio 构建工具(默认并且需要已安装)或其他构建系统,如 nmake 或 ninja(您可以使用 -G Ninja 或 -G NMake 指定(到第一个命令) ))。

    • 如果您想使用 configure 和 (gnu) make,您可以使用 msys2 之类的东西在 posix 仿真层中执行此操作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-05-02
      • 1970-01-01
      • 1970-01-01
      • 2014-01-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多