为什么我的应用程序在函数中搜索错误的DLL?

时间:2022-09-08 19:52:08

I am writing a Qt Application using Visual Studio 2010. My application 'Review.exe' links against QtAV.dll using QtAV.lib. In turn, QtAV links against ffmpeg, portaudio, gdiplus, etc.

我正在使用Visual Studio 2010编写Qt应用程序。我的应用程序'Review.exe'使用QtAV.lib链接QtAV.dll。反过来,QtAV链接到ffmpeg,portaudio,gdiplus等。

The debug version works correctly.

调试版本正常工作。

When I try and run the release version I get: The procedure entry point GdipAlloc could not be located in the dynamic link library avcodec-54.dll.

当我尝试运行发布版本时,我得到:程序入口点GdipAlloc无法位于动态链接库avcodec-54.dll中。

GdipAlloc is a part of Gdiplus. Why is the wrong dll being searched for the function? This only happens in the release build.

GdipAlloc是Gdiplus的一部分。为什么要搜索错误的dll函数?这只发生在发布版本中。

If I replace the release version of QtAV.dll with the debug version of QtAV.dll, the release version of Review will load the debug version of QtAV.dll.

如果我用QtAV.dll的调试版替换QtAV.dll的发行版,则Review的发行版将加载QtAV.dll的调试版。

Setting the linker flag /DEBUG on the release build causes the problem to go away. However I'd like to figure out the cause and a proper solution.

在发布版本上设置链接器标志/ DEBUG会导致问题消失。但是,我想弄清楚原因和适当的解决方案。

1 个解决方案

#1


0  

I find that it does happens for vs2010. vs2012 works fine. I compile portaudio by vs2010 again(use cmake is quite easy), and generate FFmpeg .lib files by vs2010 tools, then compile QtAV again, this errors disappears! I have uploaded new development files to build QtAV. Download FFmpeg-2.0.1_mingw32+msvc.7z and portaudio-v19_msvc2010x86_20130813.7z here: https://sourceforge.net/projects/qtav/files/depends

我发现它确实发生在vs2010上。 vs2012工作正常。我再次通过vs2010编译portaudio(使用cmake非常简单),并通过vs2010工具生成FFmpeg .lib文件,然后再次编译QtAV,这个错误就消失了!我上传了新的开发文件来构建QtAV。下载FFmpeg-2.0.1_mingw32 + msvc.7z和portaudio-v19_msvc2010x86_20130813.7z:https://sourceforge.net/projects/qtav/files/depends

: )

#1


0  

I find that it does happens for vs2010. vs2012 works fine. I compile portaudio by vs2010 again(use cmake is quite easy), and generate FFmpeg .lib files by vs2010 tools, then compile QtAV again, this errors disappears! I have uploaded new development files to build QtAV. Download FFmpeg-2.0.1_mingw32+msvc.7z and portaudio-v19_msvc2010x86_20130813.7z here: https://sourceforge.net/projects/qtav/files/depends

我发现它确实发生在vs2010上。 vs2012工作正常。我再次通过vs2010编译portaudio(使用cmake非常简单),并通过vs2010工具生成FFmpeg .lib文件,然后再次编译QtAV,这个错误就消失了!我上传了新的开发文件来构建QtAV。下载FFmpeg-2.0.1_mingw32 + msvc.7z和portaudio-v19_msvc2010x86_20130813.7z:https://sourceforge.net/projects/qtav/files/depends

: )