【问题标题】:Unable to find SDL2_gfx library on linux在 linux 上找不到 SDL2_gfx 库
【发布时间】:2014-11-28 13:36:29
【问题描述】:

我正在尝试安装 gfx2 以便在 C++ 中将其与 SDL2 一起使用。

我按照official documentation.描述的安装过程进行

一切正常,除了我开始测试安装成功,在测试程序部分,在步骤 ./configure 我得到以下结果:

checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for an ANSI C-conforming const... yes checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for SDL... yes checking how to run the C preprocessor... gcc -E checking for X... libraries , headers checking for OpenGL support... yes checking for OpenGL ES support... no checking for OpenGL ES2 support... no checking for pixelColor in -lSDL2_gfx... no configure: error: *** Unable to find SDL2_gfx library

我的研究中没有发现任何类似的问题。

显然该库没有安装在它应该在的位置(如果有的话),但我不知道脚本在哪里寻找。

有什么想法吗?

感谢您的帮助。

【问题讨论】:

    标签: c++ c linux opengl gcc


    【解决方案1】:

    确保您以 root 权限运行 make install,例如sudo make install 如果以非 root 用户身份登录。或者,您可以在 LIBRARY_PATH 环境变量中指定库二进制文件位置,例如export LIBRARY_PATH=$LIBRARY_PATH:~/sdl2C_INCLUDE_PATH 变量中的标头位置(如果需要)。

    【讨论】:

      【解决方案2】:

      谢谢你的回答,

      当我输入 make install 命令时,我确实具有 root 权限(如果没有,它会给出错误)。

      我尝试了export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib(安装库的目标)和export C_INCLUDE_PATH=$INCLUDE_PATH:/usr/local/include/SDL2/(但这里只有 SDL2 标头,没有 gfx 的痕迹)。

      ./configure 的结果和之前完全一样。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2018-08-31
        • 2018-11-12
        • 1970-01-01
        • 2018-03-04
        • 1970-01-01
        • 2017-11-06
        • 1970-01-01
        相关资源
        最近更新 更多