无法定位 xxxx 与动态链接库 avcodec-xx.dll上
来源:互联网 发布:网络大电影发行协议 编辑:程序博客网 时间:2024/05/17 09:06
http://blog.csdn.net/liuruihan/article/details/26716271
http://blog.csdn.net/bing87496988/article/details/25061659
http://blog.csdn.net/mythma/article/details/26558619
最近用vs2008在做一个基于ffmpeg的解码模块,debug下调试没有发现问题, 但是在release下运行时提示如下错误,百思不得其解,查了一下午也没找到什么问题。期间也换过不同的ffmpeg库,保证lib和dll是同一版本,但是也没有解决问题。
最终找到了问题的解决办法: release 项目属性中-----》连接器----》优化 选项中选择:保留未引用数据
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
win7 下开发视频服务器,用到ffmpeg,debug版本运行正常,切换到release时,出现"0x00905a4d 处未处理的异常: 0xC0000005: 读取位置 0x00905a4d 时发生访问冲突",原以为是jrtplib得问题,鼓捣半天才发现是ffmpeg. 用一个很小的测试程序验证,在av_register_all处就崩溃.鸟!
难道是用mingw生成ffmpeg时有调试信息,应用程序用release编译冲突?
ffmpeg版本老旧,有这个bug?
我编译的选项不对?
测试排除了上面3个疑问. 那就只有debug和release版本的区别了. 将release的优化选项逐个的剔除测试,找到了问题所在:
连接器->优化->引用
在release版本下面使用"保留未引用数据(/OPT:NOREF)"选项才可以正常运行.
google "ffmpeg OPT:NOREF" 发现有人已经发现并解决了这个问题.
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
编译FFmpeg是一件痛苦的事情,一般都直接使用Zeranoe FFmpeg Builds。
如果使用这个版本,需要注意ffmpeg的帮助里的一段话:
- To create import libraries that work with the /OPT:REF option (which is enabled by default in Release mode), follow these steps:
- Open the Visual Studio Command Prompt.
- Alternatively, in a normal command line prompt, call ‘vcvars32.bat’ which sets up the environment variables for the Visual C++ tools (the standard location for this file is something like ‘C:\Program Files (x86_\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat’).
- Enter the ‘bin’ directory where the created LIB and DLL files are stored.
- Generate new import libraries with lib.exe:
- lib /machine:i386 /def:..\lib\foo-version.def /out:foo.lib
- Replace foo-version and foo with the respective library names.
否则Relesae下就会出问题。
这是VS2010的一个bug,据说VS2012后已经修复。
0 0
- 无法定位 xxxx 与动态链接库 avcodec-xx.dll上
- 无法定位序数 xxxx 与动态链接库 avcodec-55.dll上
- 无法定位序数 xxxx 与动态链接库 avcodec-55.dll上
- 无法定位序数 xxxx 与动态链接库 avcodec-55.dll上
- 无法定位序数 xxxx 与动态链接库 avcodec-55.dll上
- ffmpeg无法定位序数3751于动态链接库avcodec-55.dll上
- 无法定位程序输入点GdiplusStartup于动态链接库avcodec-57.dll上
- 无法定位序数 xxxx 与动态链接库 avformat-56.dll上
- 无法定位序数 xxxx 与动态链接库 avformat-56.dll上
- 解决“无法定位程序输入点于动态链接库XX.DLL上”的方法
- VS2008 使用共享DLL中使用MFC在其它机子上无法运行,提示无法定位序数xxxx于动态链接库mfc90u.dll上的问题解决方法
- 无法定位序数XX于动态链接库XX.dll的解决办法
- firefox 无法定位程序输入点_except_handler4_common与动态链接库msvcrt.dll上怎么解决
- 无法定位序数5076与动态链接库MFC42D.DLL
- 无法定位序数4540于动态链接库LIBEAY32.dll上(以及其它无法定位序数的解决方案)
- 无法定位程序输入点ldrlockloaderlock于动态链接库ntdll.dll上的解决办法
- 无法定位程序输入点 LdrSetSessionName 于动态链接库 mfc40u.dll 上
- 关于“无法定位程序输入点getaddrinfo于动态链接库WS32_32.dll上”的问题
- Spring.NET 基本使用
- leetcode 238:Product of Array Except Self
- GCD同步问题
- POJ——1979Red and Black
- session与cookie整理
- 无法定位 xxxx 与动态链接库 avcodec-xx.dll上
- Debug模式和Release模式区别
- memcache简单使用
- python pip国内镜像
- 二维码
- java项目上线一定要注意的问题
- 枚举表示状态,选项,状态码
- db_info.xml
- 关于iOS9 更新后,微博,微信 语言变成英语的问题