Update the libdash library version and recompile under vs2019

At present, most platforms are 64-bit, but the official libdash open source code provided by bitmovin is only for the 32-bit platform, because I want to embed this platform into my own player, which is 64-bit, so just record the update library Version records, mainly updated libxml2-2.9.10, zlib-1.2.11, libiconv-1.16 and curl-7.74.0

编译libxml2-2.9.10、zlib-1.2.11、libiconv-1.16

  1. Obtain the source code of libxml2-2.9.10, zlib-1.2.11, libiconv-1.16 under Windows
# GitHub链接https://github.com/kiyolee/libxml2-win-build可找到libxml2-2.9.10、zlib-1.2.11、libiconv-1.16的clone方式
# 新建文件夹,分别克隆3个库的源码
# git clone https://github.com/kiyolee/libiconv-win-build.git
# git clone https://github.com/kiyolee/zlib-win-build.git
# git clone https://github.com/kiyolee/libxml2-win-build.git

Insert picture description here

  1. Open the project separately with vs2019, because libxml2 depends on libiconv and zlib, first compile libiconv and zlib and then compile libxml2 (here we use libiconv-win-build to demonstrate, the other two compilation methods are similar), I compiled build-VS2019

Insert picture description here

  1. Right-click iconv under dll as the startup project, set x64 Debug (set according to needs)

Insert picture description here

  1. Local Windows debugger or F5 running, you can find libiconv.dll and libiconv.lib in the x64/Debug directory under the project

Insert picture description here

  1. Right-click iconv under static as the startup project, set x64 Debug (set according to needs), local Windows debugger or F5 operation, you can find the libiconv-static.lib library in the x64/Debug directory under the project
  2. Use steps 1-5 to compile the zlib library to generate libz.dll, libz.lib and libz-static.lib
  3. Open the libxml2 project with vs2019, set libxml2 as the startup project, and set x64 Debug (set as needed)

Insert picture description here

  1. Local Windows debugger or F5 running, you can find libxml2.dll and libxml2.lib libraries in the x64/Debug directory under the project

Compile curl-7.74.0

  1. Download the current latest version of curl source code on the website (https://curl.se/download.html)

Insert picture description here

  1. After decompression, select the version to be compiled in the project directory curl-7.74.0/projects/Windows

Insert picture description here

  1. vs2019 Open curl-all.sln under curl-7.74.0/projects/Windows/VC15, set curl as the startup item, and set x64 DLL Debug (set according to your needs)

Insert picture description here

  1. Local Windows debugger or F5 running, you can find libcurld.dll and libcurld.lib in the build\Win64\VC15\DLL Debug directory under the project

Insert picture description here

Compile libdash

  1. Create a new project in vs2019, select the project type as "Windows Desktop Wizard", the name of the configuration project is libdash, and select the creation location at the same time, click Create, the "Windows Desktop Wizard" configuration is as follows

Insert picture description here

  1. Import libdash project code and new version library
# 工程目录(libdash)下新建iconv目录, 
 # 1. 将libiconv-win-build下的include目录复制到iconv下
 
# 工程目录(libdash)下新建libxml2目录, 
 # 1. 在libxml2目录下新建bin目录, 之前编译的libxml2.dll复制到bin下;
 # 2. 在libxml2目录下新建lib目录, 之前编译的libxml2.lib复制到lib下;
 # 3. 将libxml2-win-build下的include目录复制到libxml2下
 
# 工程目录(libdash)下新建libcurl目录, 
 # 1. 在libcurl目录下新建bin目录, 之前编译的libcurld.dll复制到bin下;
 # 2. 在libcurl目录下新建lib目录, 之前编译的libcurld.lib复制到lib下;
 # 3. 在libcurl目录下新建include目录, 将curl-7.74.0/include下的curl目录复制到include下

# 工程目录(libdash)下新建libdash目录, 
 # 1. 将(libdash源码)libdash-master\libdash\libdash下的include复制到libdash下;
 # 2. 在libdash目录下新建source目录, 将(libdash源码)libdash-master\libdash\libdash\source下helpers、manager、metrics、mpd、network、portable、xml和libdash.cpp复制到source下
  1. Configure libdash project, set x64 Debug
# 右键项目(libdash), 点击属性,
 # 1. 将libdash目录下include和source两个目录下的头文件(.h)添加到libdash工程的头文件中,将源文件(.cpp)文件添加到libdash工程的源文件中
 # 2. 调试 -> 环境: PATH=$(PATH);$(ProjectDir)libcurl\bin;$(ProjectDir)libxml2\bin;
 # 3. C/C++ -> 常规 -> 附加包含目录: 
      # $(ProjectDir)libxml2\include
      # $(ProjectDir)libdash\include
      # $(ProjectDir)libcurl\include
      # $(ProjectDir)iconv\include
 # 4. 链接器 -> 常规 -> 附加库目录: 
      # $(ProjectDir)libxml2\lib
      # $(ProjectDir)libcurl\lib
 # 5. 链接器 -> 常规 -> 输入: 
      # libcurld.lib
      # libxml2.lib

Insert picture description here

  1. Local Windows debugger or F5 running, you can find libdash.dll and libdash.lib in the x64/Debug directory under the project

Insert picture description here

Note:

# 出现错误: error C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

# 解决方案:
# 项目(libdash)右键 -> 属性 -> C/C++ -> 预处理器 -> 预处理器定义 添加 _CRT_SECURE_NO_WARNINGS

If there is any infringement, please contact to delete it. If there is an error, please correct me, thank you

Guess you like

Origin blog.csdn.net/xiao_ma_nong_last/article/details/112979671