gpt4 book ai didi

ffmpeg - mingw64环境编译时查找库(libgcrypt和libgpg-error)

转载 作者:行者123 更新时间:2023-12-04 23:27:10 27 4
gpt4 key购买 nike

我是一个真正的初学者,所以提前为明显的问题道歉。我正在尝试编译 ffmpeg 的自定义构建,它具有一些普通构建没有的额外依赖项。其中有libgcryptlibgpg-error - 我知道这一点,因为当我运行 configure 时,它失败了,并且日志包含:

C:/workspace/windows/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcrypt
C:/workspace/windows/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgpg-error

考虑到这一点,我克隆了 libgpg-error 的 repo,运行 makemake install , 它创建了 libgpg-error.dll.alibgpg-error.la/home/myuser/w64root/lib .我尝试将此路径添加到我的 $LIB环境变量,但配置运行仍然说它找不到库。

我怎样才能让它可见?我也有 pkg-config在机器上可用 - 将手动创建 .pc文件帮助我吗?

谢谢!

最佳答案

如果你运行 ./configure -h ,您应该在输出中看到:

Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
CXX C++ compiler command
CXXFLAGS C++ compiler flags

备注 LDFLAGS尤其是。这涵盖了您的情况,因为 /home/myuser/w64root/lib不在链接器的标准搜索目录中。因此运行:
export LDFLAGS='-L/home/myuser/w64root/lib'; ./configure

你应该没事。

关于ffmpeg - mingw64环境编译时查找库(libgcrypt和libgpg-error),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40848974/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com