编译libsrt.so库,按官方的说明文档来操作,最终成功!中间试图用msys2+mingw64来编译失败了!
annot find -lwsock32.lib 和 ld.exe: cannot find -lws2_32.lib。应该是可以解决的。
下面记录用vs2019来编译生成srt.lib/srt.dll的过程。
vcpkg install openssl --triplet x64-windows
vcpkg install pthreads --triplet x64-windows
这两个操作均失败!openssl用下面的方法来生成的,成功了!pthreads则用vs2019来打开编译x64+release
$ cd srt-master
$ cmake ../ -G"Visual Studio 16 2019" -A x64 -DPTHREAD_INCLUDE_DIR=D:\wincpp\ffmpeg\srt\winx64\include -DPTHREAD_LIBRARY=D:\wincpp\ffmpeg\srt\winx64\lib
$ cmake --build . //有链接上的问题,用vs2019工程打开后修改配置:
D:\wincpp\ffmpeg\srt\srt-master\buildx64\Release
LIB目录: D:\wincpp\ffmpeg\srt\winx64\lib
libs: libcrypto.lib;libssl.lib;pthread_dll.lib;ws2_32.lib
原来cmake生成的工程配置感觉有点糟糕!
终于,编译通过,生成srt.dll, srt.lib。
windows下编译openssl过程:OpenSSL 1.1.1g
For OpenSSL 1.1.0 and above perform these steps:
1. Ensure you have perl installed on your machine (e.g. ActiveState or Strawberry), and available on your %PATH%
2. Ensure you have NASM installed on your machine, and available on your %PATH%
3. Extract the source files to your folder, here cd c:\myPath\openssl
4. Launch Visual Studio tool x64 Cross Tools Command prompt
5. Goto your defined folder cd c:\myPath\openssl
Configure for the target OS with perl Configure VC-WIN64A or other configurations to be found in the INSTALL file (e.g. UNIX targets).
For instance: perl Configure VC-WIN64A.
(Optional) In case you compiled before on 32 or 64-bits, make sure you run nmake clean to prevent trouble across 32 and 64-bits which share output folder.
Now build with: nmake
Output can be found in the root of your folder as libcrypto-1_1x64.dll and libssl-1_1-x64.dll
(with all the build additionals such as .pdb .lik or static .lib).
You may check this is true 64bit code using the Visual Studio tool 'dumpbin'.
For instance dumpbin /headers libcrypto-1_1x64.dll | more, and look at the FILE HEADER section.
Test the code using the 'test' make target, by running nmake test.
Reminder, clean your code to prevent issues the next time you compile for a different target. See step 7.
$ perl Configure VC-WIN64A --prefix=D:\wincpp\ffmpeg\srt\winx64
$ nmake && nmake install
详细解决方案
windows下编译srt.dll过程
热度:78 发布时间:2024-02-21 04:19:04.0
相关解决方案
- my lovely windows , see you!该如何处理
- Windows Mobile开发中的有关问题
- windows mobile中j2me的疑问,该怎么解决
- Socket通讯 windows mobile操作系统支持吗
- windows mobile 6.1下有支持蓝牙传输的java虚拟机吗?解决思路
- jdk-6u7-windows-i586-p.exe 后边的-p是什么意思
- Windows 8之父Steven Sinofsky将离开微软,微软官方已确认解决方法
- Windows 八之父Steven Sinofsky将离开微软,微软官方已确认
- Windows Form 中怎么将 treeview 的节点与页面内容关联
- DevExpress的WinForm控件都沿袭自System.Windows.Forms.Contrl吗
- Free Windows Forms Controls——Krypton Toolkit解决思路
- ActiveX 安装出现 Windows Installer 有关问题
- vc写的 windows service 控制台程序有关问题
- c++/cli windows form有关问题
- Windows media player控件编程播放avi只有声音没图像啊解决方案
- windows 窗口进程lParam参数的,高低两个宏定义
- j# 里如何定义和 C#同样功能的 override void DefWndProc(ref System.Windows.Forms.Message m) 多谢,很
- dundas chart for windows 怎么调整柱状图的宽度,怎么设置柱状图的起止点
- windows service装配服务程序
- windows server 2008 + IIS 7.5 上 网站自定义权限过滤有关问题
- windows 8 的搜索是不是有有关问题?是不是个新Bug
- windows azure 的一个非常初级的有关问题
- windows 服务没法启动
- windows 八批处理 显示时间
- res://C:\WINDOWS\system32\shdoclc.dll/http_500.htm解决思路
- windows 7 x64 安装Oracle 10g 无法解析指定的连接标识符 异常
- 网站放到 windows server 2003服务器中,服务器在安装时设置的连接数是5,这样设置对大量用户访问有影响吗?解决办法
- 登录失败。该登录名来自不受信任的域,不能与 Windows 身份验证一起使用。该如何处理
- windows 2003服务器 图片上传
- windows authentication验证的一个有关问题