strncpy_s error when deploying ffmpeg streaming application on XP

会有一股神秘感。 提交于 2019-12-14 01:23:43

问题


I'm trying to deploy an application that uses ffmpeg to stream camera output to an XP machine. The application is written compiled with gcc mingw32 and runs fine on Windows 8. But on Windows XP I get the following error:

The procedure entry point strncpy_s could not be located in the 
dynamic link library msvcrt.dll

GCC command, excluding paths:

g++ -o mingw\streamer.exe src\testffmpeg.o -lavformat -lavutil -lavcodec -lFlyCapture2_C_v100

Dependency walker shows the following:

How can I work around this strncpy_s problem? It seems to be ffmpeg which uses this function is msvcrt. I used the windows binaries they provided. I'd rather not have to compile the library myself, as it has a huge set of dependencies.


回答1:


Although not a generic solution, I solved this issue be using an older version of ffmpeg. The following release is the newest that does not require strncpy_s in msvcr.dll

  • ffmpeg-20130706-git-63d7684-win32-shared
  • ffmpeg-20130706-git-63d7684-win32-dev

As discussed in this forum thread




回答2:


Using ffmpeg-20130706 will work because it doesn't use the strncpy_s symbol instead of strncpy which is included in the runtime library. Unless the symbols you're using from ffmpeg have changed, you should be able to swap out the dlls wiht the ones from two weeks ago, otherwise, just recompile with the older dependencies.



来源:https://stackoverflow.com/questions/17650354/strncpy-s-error-when-deploying-ffmpeg-streaming-application-on-xp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!