无法为Windows构建OpenH264.lib

问题描述 投票:0回答:3

我遵循了https://github.com/cisco/openh264中提到的所有说明,但我无法通过。该信息在链接中引用,但相当混乱。

windows build openh264
3个回答
8
投票

替代方式:
您可以在 Windows 中使用 Visual Studio 构建 Openh264。以下是步骤..

  • i) 下载 cisco 提供的 OpenH264 源代码(您已经 提到https://github.com/cisco/openh264)。
  • ii) 现在您将在以下位置找到两个与 Visual Studio 兼容的项目 目录 /OpenH264/codec/build/win32/dec/OpenH264/编解码器/build/win32/enc
  • iii) 您需要从 http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/
  • 下载 NASM 软件
  • iv) 将 NASM 软件安装在目录 C:\NASM 或任何您喜欢的位置。
  • v) 然后将 NASM 可执行路径添加到所有这些 Visual Studio 项目。
  • vi) 然后一般可以选择静态库或动态库 选项。
  • vi) 如果您能够成功执行所有这些操作,您将拥有 5 个不同的 .lib 或 .dll 文件,名为 welsdcore、welsdecplus、welsecore、welsencplus、welsvp 以及 可用于任何视觉工作室项目。

现在,如果您想获得 openh264 功能,只需将所有这些库添加到您的项目中即可享受。 希望它能帮助你..:)


1
投票

我在使用推荐的 mingw 方法在 Windows 上构建 openh264 时也遇到了一些困难。

就我而言,我尝试过的所有配置都崩溃了:


make

我将现有的解决方案/项目 (VS2008) 转换为 VS2013,并使用创建的 .lib 文件进行链接/构建。

您可以在

bash -c "make OS=msvc ARCH=x86_64 USE_ASM=No BUILDTYPE=Debug clean" bash -c "make OS=msvc ARCH=x86_64 USE_ASM=No BUILDTYPE=Debug" 0 [main] make 3888 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION 564 [main] make 3888 open_stackdumpfile: Dumping stack trace to make.exe.stackdump 0 [main] make 5448 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION 561 [main] make 5448 open_stackdumpfile: Dumping stack trace to make.exe.stackdump copying dll files to destination folder... FullDestDir is E:\projects\openh264\bin\x64\Debug current dir is: E:\projects\openh264 DestDir is bin/x64/Debug cp: cannot stat `openh264.dll': No such file or directory cp: cannot stat `openh264.lib': No such file or directory cp: cannot stat `openh264.pdb': No such file or directory cp: cannot stat `codec_unittest.exe': No such file or directory cp: cannot stat `h264enc.exe': No such file or directory cp: cannot stat `h264dec.exe': No such file or directory BuildDebugFlag =1 BuildReleaseFlag =0 BuildDebugInfo ="build debug--failed" BuildReleaseInfo =NULL aBuildFlagList is 1 0 ReturnCode is 1

{openh264_dir}\codec\build\win32\enc
中找到解决方案。 构建解决方案将在
{openh264_dir}\codec\build\win32\dec
 中创建 .lib 和 .dll

要链接到库,您需要链接到

{openh264_dir}\bin\Win32\Release


运行时,您的应用程序目录中需要同时具有

welsenc.lib

welsenc.dll
。到目前为止,它似乎对我的使用效果很好。 我假设构建解码器将是类似的。
    


0
投票
welsvp.dll

官方 github 存储库中给定的步骤正在运行,您可以按照以下步骤轻松编译 Windows:


获取
    cygwin
  1. ,并安装最新版本的 Openh264 软件包
    获取最新版本的
  2. NASM
  3. 在某个目录中安装 NASM (
  4. make
  5. )
    在环境变量中添加安装目录路径
  6. 在 cygwin 中运行
  7. say C:/NASM
  8. 命令以确保路径已正确设置
    进入openh264源码
  9. nasm
  10. 目录
    根据系统类型运行安装命令:
  11. /build
等待安装完成。
© www.soinside.com 2019 - 2024. All rights reserved.