From 340a47dc661375dd13a71c64c80747f543b6c2c8 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 24 Jun 2013 08:19:34 +0000 Subject: [PATCH] From Wang Rui, "The osgdb_ffmpeg plugin may not work with latest ffmpeg windows sdk and will say "The procedure entry point xxx could not be located in xxx.dll" instead. The following link describes the reason (maybe a certain optimization problem of the VS compiler): http://forum.videolan.org/viewtopic.php?f=32&t=98097 After adding the /OPT:NOREF, the problem has gone. " --- src/osgPlugins/ffmpeg/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/ffmpeg/CMakeLists.txt b/src/osgPlugins/ffmpeg/CMakeLists.txt index bfb5f3ba9..4c6f60270 100644 --- a/src/osgPlugins/ffmpeg/CMakeLists.txt +++ b/src/osgPlugins/ffmpeg/CMakeLists.txt @@ -51,6 +51,9 @@ IF(CMAKE_COMPILER_IS_GNUCXX) STRING(REGEX REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") ENDIF() - #### end var setup ### SETUP_PLUGIN(ffmpeg ffmpeg) + +IF(MSVC) + SET_TARGET_PROPERTIES(${TARGET_DEFAULT_PREFIX}ffmpeg PROPERTIES LINK_FLAGS "/OPT:NOREF") +ENDIF(MSVC)