Ogre Video Plugin (using FFmpeg)

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Re: Ogre Video Plugin (using FFmpeg)

Post by Zeal »

Here is the complete output from cMake...

Code: Select all

Boost version: 1.60.0
Found the following Boost libraries:
  date_time
  thread
  system
  chrono
Looking for OGRE...
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
Found Ogre Ghadamon (1.9.0)
Found OGRE: C:/SDKs/Ogre/build/lib/Debug/OgreMain_d.lib
Looking for OGRE_Paging...
Could not locate OGRE_Paging
Looking for OGRE_Terrain...
Could not locate OGRE_Terrain
Looking for OGRE_Property...
Could not locate OGRE_Property
Looking for OGRE_RTShaderSystem...
Could not locate OGRE_RTShaderSystem
Looking for OGRE_Volume...
Could not locate OGRE_Volume
Looking for OGRE_Overlay...
Could not locate OGRE_Overlay
Configuring done
I am using boost 1.6 and ogre 1.9 (both built from source, both working in other projects). Should I be concerned about those 'could not find OGRE_Terrain' warning? I wouldn't think those plugins are needed for this, or are they?

Only other thing I can think of - it has something to do with the pre built ffmpeg 'dev package' I am using (https://ffmpeg.zeranoe.com/builds/). It only included libs and headers, is that the problem?
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Re: Ogre Video Plugin (using FFmpeg)

Post by Zeal »

Well I was able to get rid of the "undeclared identifiers" by using an older version of ffmpeg (using the ffmpeg-2.2.3-win32-dev found here...)

https://ffmpeg.zeranoe.com/builds/win32/dev/

However, now I am getting a million linker errors...

Code: Select all

1>------ Build started: Project: OgreVideoPlugin, Configuration: Debug x64 ------
1>     Creating library C:/SDKs/OgreVideoPlugin-master/build/Debug/OgreVideoPlugin.lib and object C:/SDKs/OgreVideoPlugin-master/build/Debug/OgreVideoPlugin.exp
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_get_media_type_string referenced in function "bool __cdecl openCodecContext(struct AVFormatContext *,enum AVMediaType,struct VideoInfo &,int &)" (?openCodecContext@@YA_NPEAUAVFormatContext@@W4AVMediaType@@AEAUVideoInfo@@AEAH@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_freep referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_log_get_level referenced in function "void __cdecl log_callback(void *,int,char const *,char *)" (?log_callback@@YAXPEAXHPEBDPEAD@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_log_set_level referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_log_set_callback referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_log_format_line referenced in function "void __cdecl log_callback(void *,int,char const *,char *)" (?log_callback@@YAXPEAXHPEBDPEAD@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_get_bytes_per_sample referenced in function "int __cdecl decodeAudioPacket(struct AVPacket &,struct AVCodecContext *,struct AVStream *,struct AVFrame *,struct SwrContext *,unsigned char * *,int,class FFmpegVideoPlayer *,struct VideoInfo &,bool)" (?decodeAudioPacket@@YAHAEAUAVPacket@@PEAUAVCodecContext@@PEAUAVStream@@PEAUAVFrame@@PEAUSwrContext@@PEAPEAEHPEAVFFmpegVideoPlayer@@AEAUVideoInfo@@_N@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_samples_alloc_array_and_samples referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol avcodec_alloc_frame referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol avcodec_get_frame_defaults referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol avcodec_free_frame referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol avcodec_open2 referenced in function "bool __cdecl openCodecContext(struct AVFormatContext *,enum AVMediaType,struct VideoInfo &,int &)" (?openCodecContext@@YA_NPEAUAVFormatContext@@W4AVMediaType@@AEAUVideoInfo@@AEAH@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol avcodec_close referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_init_packet referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_shrink_packet referenced in function "int __cdecl decodeAudioPacket(struct AVPacket &,struct AVCodecContext *,struct AVStream *,struct AVFrame *,struct SwrContext *,unsigned char * *,int,class FFmpegVideoPlayer *,struct VideoInfo &,bool)" (?decodeAudioPacket@@YAHAEAUAVPacket@@PEAUAVCodecContext@@PEAUAVStream@@PEAUAVFrame@@PEAUSwrContext@@PEAPEAEHPEAVFFmpegVideoPlayer@@AEAUVideoInfo@@_N@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_free_packet referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol avcodec_find_decoder referenced in function "bool __cdecl openCodecContext(struct AVFormatContext *,enum AVMediaType,struct VideoInfo &,int &)" (?openCodecContext@@YA_NPEAUAVFormatContext@@W4AVMediaType@@AEAUVideoInfo@@AEAH@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol avcodec_decode_audio4 referenced in function "int __cdecl decodeAudioPacket(struct AVPacket &,struct AVCodecContext *,struct AVStream *,struct AVFrame *,struct SwrContext *,unsigned char * *,int,class FFmpegVideoPlayer *,struct VideoInfo &,bool)" (?decodeAudioPacket@@YAHAEAUAVPacket@@PEAUAVCodecContext@@PEAUAVStream@@PEAUAVFrame@@PEAUSwrContext@@PEAPEAEHPEAVFFmpegVideoPlayer@@AEAUVideoInfo@@_N@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol avcodec_decode_video2 referenced in function "int __cdecl decodeVideoPacket(struct AVPacket &,struct AVCodecContext *,struct AVStream *,struct AVFrame *,struct SwsContext *,struct AVPicture *,class FFmpegVideoPlayer *,struct VideoInfo &,bool)" (?decodeVideoPacket@@YAHAEAUAVPacket@@PEAUAVCodecContext@@PEAUAVStream@@PEAUAVFrame@@PEAUSwsContext@@PEAUAVPicture@@PEAVFFmpegVideoPlayer@@AEAUVideoInfo@@_N@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol avpicture_alloc referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol avpicture_free referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_register_all referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol avformat_open_input referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol avformat_find_stream_info referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_find_best_stream referenced in function "bool __cdecl openCodecContext(struct AVFormatContext *,enum AVMediaType,struct VideoInfo &,int &)" (?openCodecContext@@YA_NPEAUAVFormatContext@@W4AVMediaType@@AEAUVideoInfo@@AEAH@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_read_frame referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol avformat_close_input referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol av_dump_format referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol sws_freeContext referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol sws_scale referenced in function "int __cdecl decodeVideoPacket(struct AVPacket &,struct AVCodecContext *,struct AVStream *,struct AVFrame *,struct SwsContext *,struct AVPicture *,class FFmpegVideoPlayer *,struct VideoInfo &,bool)" (?decodeVideoPacket@@YAHAEAUAVPacket@@PEAUAVCodecContext@@PEAUAVStream@@PEAUAVFrame@@PEAUSwsContext@@PEAUAVPicture@@PEAVFFmpegVideoPlayer@@AEAUVideoInfo@@_N@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol sws_getCachedContext referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol swr_init referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol swr_alloc_set_opts referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol swr_free referenced in function "void __cdecl videoDecodingThread(struct ThreadInfo *)" (?videoDecodingThread@@YAXPEAUThreadInfo@@@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol swr_convert referenced in function "int __cdecl decodeAudioPacket(struct AVPacket &,struct AVCodecContext *,struct AVStream *,struct AVFrame *,struct SwrContext *,unsigned char * *,int,class FFmpegVideoPlayer *,struct VideoInfo &,bool)" (?decodeAudioPacket@@YAHAEAUAVPacket@@PEAUAVCodecContext@@PEAUAVStream@@PEAUAVFrame@@PEAUSwrContext@@PEAPEAEHPEAVFFmpegVideoPlayer@@AEAUVideoInfo@@_N@Z)
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXAEBVexception@std@@@Z) referenced in function "void __cdecl boost::conversion::detail::throw_bad_cast<int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(void)" (??$throw_bad_cast@HV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@detail@conversion@boost@@YAXXZ)
1>FFmpegVideoPlayer.obj : error LNK2001: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXAEBVexception@std@@@Z)
1>FFmpegVideoPlugin.obj : error LNK2001: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXAEBVexception@std@@@Z)
1>FFmpegVideoPluginDLL.obj : error LNK2001: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXAEBVexception@std@@@Z)
1>C:/SDKs/ffmpeg-2.2.3-win32-dev/lib\avformat.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
1>C:/SDKs/ffmpeg-2.2.3-win32-dev/lib\avcodec.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
1>C:/SDKs/ffmpeg-2.2.3-win32-dev/lib\swscale.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
1>C:/SDKs/ffmpeg-2.2.3-win32-dev/lib\swresample.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
1>C:/SDKs/ffmpeg-2.2.3-win32-dev/lib\avutil.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
1>C:\SDKs\OgreVideoPlugin-master\build\Debug\OgreVideoPlugin.dll : fatal error LNK1120: 36 unresolved externals
2>------ Skipped Build: Project: INSTALL, Configuration: Debug x64 ------
2>Project not selected to build for this solution configuration 
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 1 skipped ==========
Not sure why I am running into so many problems... the only warning in CMake was
WARNING: CMAKE_BUILD_TYPE is not defined!
Defaulting to CMAKE_BUILD_TYPE=Release. Use ccmake to set a proper value.
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Ogre Video Plugin (using FFmpeg)

Post by c6burns »

avcodec and avformat libraries churn versions (and add features) like crazy ... you have to make sure you are using a compatible version. I have built and used this library with a prebuilt ffmpeg (dont remember which version, but it was from zeranoe) so I know it does work. That being said, some of those symbols I recognize from avcodec and they should NOT be missing regardless of version. Be sure you are actually linking avcodec as this no longer looks like version incompatibility.

EDIT: Oh I reread this thread, I think I confused you with someone else who had version incompatibility with ffmpeg using a different project. My mistake, but yeah it just doesn't look like you are linking avcodec. Maybe you are linking something that's not binary compatible and the linker is skipping it, not sure.
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Re: Ogre Video Plugin (using FFmpeg)

Post by Zeal »

Oh and I forgot to mention, when I first tried to compile to solution, I got the following (in addition to all the linker errors)...

Code: Select all

2>libboost_date_time-vc140-mt-sgd-1_60.lib(greg_month.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in FFmpegVideoDecodingThread.obj
2>libboost_thread-vc140-mt-sgd-1_60.lib(thread.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in FFmpegVideoDecodingThread.obj
2>libboost_thread-vc140-mt-sgd-1_60.lib(tss_pe.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in FFmpegVideoDecodingThread.obj
2>libboost_system-vc140-mt-sgd-1_60.lib(error_code.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in FFmpegVideoDecodingThread.obj
2>libboost_chrono-vc140-mt-sgd-1_60.lib(chrono.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in FFmpegVideoDecodingThread.obj
So after a little googling it was suggested to change the code generation (c++->code generation->runtime library) to MTd, and those errors went away. The unresolved external symbols still persist.

I have tried a couple different versions of the ffmpeg libs, verified the project properties is pointing to the right directory, etc... Here is my linker->input->additional dependencies (auto populated form cmake)

Code: Select all

kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
C:\SDKs\boost_1_60_0\stage\lib\libboost_date_time-vc140-mt-sgd-1_60.lib
C:\SDKs\boost_1_60_0\stage\lib\libboost_thread-vc140-mt-sgd-1_60.lib
C:\SDKs\boost_1_60_0\stage\lib\libboost_system-vc140-mt-sgd-1_60.lib
C:\SDKs\boost_1_60_0\stage\lib\libboost_chrono-vc140-mt-sgd-1_60.lib
C:\SDKs\Ogre\build\lib\Debug\OgreMain_d.lib
C:\SDKs\boost_1_60_0\stage\lib\libboost_atomic-vc140-mt-sgd-1_60.lib
avformat.lib
avcodec.lib
swscale.lib
swresample.lib
avutil.lib
ws2_32.lib
wsock32.lib
You would think it could find what its looking for in those libs... what the heck is going on?
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Re: Ogre Video Plugin (using FFmpeg)

Post by Zeal »

Ok I think the problem may have been a 32bit/64bit issue. When I ran CMake, the first time you hit "Configure", the little popup asks which compiler you would like to use, and it was defaulting to VS2015 64, I changed it to regular vanilla VS2015, and it is now only complaining about boost (which I guess I also built as 64bit).

Downloaded a 32 bit boost, but now I am having trouble getting CMake to find it...
CMake Error at C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:1247 (message):
Unable to find the requested Boost libraries.

Boost version: 1.59.0

Boost include path: C:/SDKs/boost_1_59_0

Could not find the following static Boost libraries:

boost_date_time
boost_thread
boost_system
boost_chrono

No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.
Call Stack (most recent call first):
CMakeLists.txt:65 (find_package)
Boost is indeed installed at "C:/SDKs/boost_1_59_0", and I even added the following lines to the cMake script...

Code: Select all

set(Boost_INCLUDE_DIRS "C:/SDKs/boost_1_59_0/boost")
set(Boost_LIBRARY_DIRS "C:/SDKs/boost_1_59_0/libs")

SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "C:/SDKs/boost_1_59_0/boost")
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "C:/SDKs/boost_1_59_0/libs")
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Ogre Video Plugin (using FFmpeg)

Post by c6burns »

That makes total sense that it was 32 vs 64. Boost can be annoying. Start by doing this in your CMakeLists.txt:

Code: Select all

set(Boost_DEBUG ON)
Then when you configure the project via cmake you will see exactly what names/paths it is searching under. For example it could potentially be searching for dynamic boost, but you only built static and you could then force static using further FindBoost.cmake options
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Re: Ogre Video Plugin (using FFmpeg)

Post by Zeal »

Ok added this to the top of the CMake script...

Code: Select all

set(Boost_DEBUG ON)

set(BOOST_ROOT "C:/SDKs/boost_1_59_0")
set(BOOST_INCLUDEDIR "C:/SDKs/boost_1_59_0/boost")
set(BOOST_LIBRARYDIR "C:/SDKs/boost_1_59_0/libs")

SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "C:/SDKs/boost_1_59_0/boost")
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "C:/SDKs/boost_1_59_0/libs")
This is the output (more info this time, but still the exact same error)...

Code: Select all

[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:551 ] _boost_TEST_VERSIONS = 1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:553 ] Boost_USE_MULTITHREADED = ON
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:555 ] Boost_USE_STATIC_LIBS = ON
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:557 ] Boost_USE_STATIC_RUNTIME = ON
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:559 ] Boost_ADDITIONAL_VERSIONS = 
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:561 ] Boost_NO_SYSTEM_PATHS = 
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:613 ] Declared as CMake or Environmental Variables:
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:615 ]   BOOST_ROOT = C:/SDKs/boost_1_59_0
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:617 ]   BOOST_INCLUDEDIR = C:/SDKs/boost_1_59_0/boost
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:619 ]   BOOST_LIBRARYDIR = C:/SDKs/boost_1_59_0/libs
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:621 ] _boost_TEST_VERSIONS = 1.59.0;1.59;1.58.0;1.58;1.57.0;1.57;1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:714 ] location of version.hpp: C:/SDKs/boost_1_59_0/boost/version.hpp
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:738 ] version.hpp reveals boost 1.59.0
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:824 ] guessed _boost_COMPILER = -vc140
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:834 ] _boost_MULTITHREADED = -mt
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:877 ] _boost_RELEASE_ABI_TAG = -s
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:879 ] _boost_DEBUG_ABI_TAG = -sgd
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:933 ] _boost_LIBRARY_SEARCH_DIRS_RELEASE = C:/SDKs/boost_1_59_0/libs;C:/SDKs/boost_1_59_0/lib;C:/SDKs/boost_1_59_0/stage/lib;C:/SDKs/boost_1_59_0/lib;C:/SDKs/boost_1_59_0/../lib;C:/SDKs/boost_1_59_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib_boost_LIBRARY_SEARCH_DIRS_DEBUG   = C:/SDKs/boost_1_59_0/libs;C:/SDKs/boost_1_59_0/lib;C:/SDKs/boost_1_59_0/stage/lib;C:/SDKs/boost_1_59_0/lib;C:/SDKs/boost_1_59_0/../lib;C:/SDKs/boost_1_59_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:1045 ] Searching for DATE_TIME_LIBRARY_RELEASE: libboost_date_time-vc140-mt-s-1_59;libboost_date_time-vc140-mt-s;libboost_date_time-mt-s-1_59;libboost_date_time-mt-s;libboost_date_time
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:1087 ] Searching for DATE_TIME_LIBRARY_DEBUG: libboost_date_time-vc140-mt-sgd-1_59;libboost_date_time-vc140-mt-sgd;libboost_date_time-mt-sgd-1_59;libboost_date_time-mt-sgd;libboost_date_time-mt;libboost_date_time
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:1045 ] Searching for THREAD_LIBRARY_RELEASE: libboost_thread-vc140-mt-s-1_59;libboost_thread-vc140-mt-s;libboost_thread-mt-s-1_59;libboost_thread-mt-s;libboost_thread
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:1087 ] Searching for THREAD_LIBRARY_DEBUG: libboost_thread-vc140-mt-sgd-1_59;libboost_thread-vc140-mt-sgd;libboost_thread-mt-sgd-1_59;libboost_thread-mt-sgd;libboost_thread-mt;libboost_thread
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:1045 ] Searching for SYSTEM_LIBRARY_RELEASE: libboost_system-vc140-mt-s-1_59;libboost_system-vc140-mt-s;libboost_system-mt-s-1_59;libboost_system-mt-s;libboost_system
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:1087 ] Searching for SYSTEM_LIBRARY_DEBUG: libboost_system-vc140-mt-sgd-1_59;libboost_system-vc140-mt-sgd;libboost_system-mt-sgd-1_59;libboost_system-mt-sgd;libboost_system-mt;libboost_system
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:1045 ] Searching for CHRONO_LIBRARY_RELEASE: libboost_chrono-vc140-mt-s-1_59;libboost_chrono-vc140-mt-s;libboost_chrono-mt-s-1_59;libboost_chrono-mt-s;libboost_chrono
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:1087 ] Searching for CHRONO_LIBRARY_DEBUG: libboost_chrono-vc140-mt-sgd-1_59;libboost_chrono-vc140-mt-sgd;libboost_chrono-mt-sgd-1_59;libboost_chrono-mt-sgd;libboost_chrono-mt;libboost_chrono
[ C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:1153 ] Boost_FOUND = 1
CMake Error at C:/Users/jeff/Downloads/cmake-3.4.3-win32-x86/cmake-3.4.3-win32-x86/share/cmake-3.4/Modules/FindBoost.cmake:1247 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.59.0

  Boost include path: C:/SDKs/boost_1_59_0

  Could not find the following static Boost libraries:

          boost_date_time
          boost_thread
          boost_system
          boost_chrono

  No Boost libraries were found.  You may need to set BOOST_LIBRARYDIR to the
  directory containing Boost libraries or BOOST_ROOT to the location of
  Boost.
Call Stack (most recent call first):
  CMakeLists.txt:71 (find_package)
I am using "boost_1_59_0-msvc-14.0-32.exe" that I got from here...

https://sourceforge.net/projects/boost/ ... es/1.59.0/

It appears to have boost thread, system, etc... Can't understand why it doesn't see it...

*only thing I noticed - in the error it says "Boost include path: C:/SDKs/boost_1_59_0", should that maybe be "C:/SDKs/boost_1_59_0/boost"?
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Re: Ogre Video Plugin (using FFmpeg)

Post by Zeal »

OK so looks like the libs from sourceforge are actually stored in a sub directory called "/lib32-msvc-14.0", added that path to the cmake and was able to generate a project. Now of course getting another error...

Code: Select all

1>  Generating Code...
1>libboost_date_time-vc140-mt-sgd-1_60.lib(greg_month.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in FFmpegVideoDecodingThread.obj
1>libboost_thread-vc140-mt-sgd-1_60.lib(thread.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in FFmpegVideoDecodingThread.obj
1>libboost_thread-vc140-mt-sgd-1_60.lib(tss_pe.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in FFmpegVideoDecodingThread.obj
1>libboost_system-vc140-mt-sgd-1_60.lib(error_code.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in FFmpegVideoDecodingThread.obj
1>libboost_chrono-vc140-mt-sgd-1_60.lib(chrono.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in FFmpegVideoDecodingThread.obj
I switched the code generation to MTd, which got rid of the above, but now I still get the following...

Code: Select all

1>  Generating Code...
1>avformat.lib(dixos00055.o) : error LNK2026: module unsafe for SAFESEH image.
1>avformat.lib(dixos00088.o) : error LNK2026: module unsafe for SAFESEH image.
1>avformat.lib(dixos00076.o) : error LNK2026: module unsafe for SAFESEH image.
1>avformat.lib(dixos00009.o) : error LNK2026: module unsafe for SAFESEH image.
1>avformat.lib(dixos00052.o) : error LNK2026: module unsafe for SAFESEH image.
1>avformat.lib(dixos00074.o) : error LNK2026: module unsafe for SAFESEH image.
1>avformat.lib(dixos00007.o) : error LNK2026: module unsafe for SAFESEH image.
1>avcodec.lib(dywos00102.o) : error LNK2026: module unsafe for SAFESEH image.
1>avcodec.lib(dywos00146.o) : error LNK2026: module unsafe for SAFESEH image.
1>avcodec.lib(dywos00140.o) : error LNK2026: module unsafe for SAFESEH image.
1>avcodec.lib(dywos00153.o) : error LNK2026: module unsafe for SAFESEH image.
1>avcodec.lib(dywos00104.o) : error LNK2026: module unsafe for SAFESEH image.
1>avcodec.lib(dywos00051.o) : error LNK2026: module unsafe for SAFESEH image.
1>avcodec.lib(dywos00091.o) : error LNK2026: module unsafe for SAFESEH image.
1>avcodec.lib(dywos00040.o) : error LNK2026: module unsafe for SAFESEH image.
1>avcodec.lib(dywos00134.o) : error LNK2026: module unsafe for SAFESEH image.
1>avcodec.lib(dywos00111.o) : error LNK2026: module unsafe for SAFESEH image.
1>avcodec.lib(dywos00113.o) : error LNK2026: module unsafe for SAFESEH image.
1>avcodec.lib(dywos00161.o) : error LNK2026: module unsafe for SAFESEH image.
1>avcodec.lib(dywos00164.o) : error LNK2026: module unsafe for SAFESEH image.
1>swscale.lib(dawos00008.o) : error LNK2026: module unsafe for SAFESEH image.
1>swscale.lib(dawos00027.o) : error LNK2026: module unsafe for SAFESEH image.
1>swscale.lib(dawos00011.o) : error LNK2026: module unsafe for SAFESEH image.
1>swresample.lib(dowos00011.o) : error LNK2026: module unsafe for SAFESEH image.
1>swresample.lib(dowos00001.o) : error LNK2026: module unsafe for SAFESEH image.
1>swresample.lib(dowos00008.o) : error LNK2026: module unsafe for SAFESEH image.
1>swresample.lib(dowos00004.o) : error LNK2026: module unsafe for SAFESEH image.
1>avutil.lib(daoos00175.o) : error LNK2026: module unsafe for SAFESEH image.
1>avutil.lib(daoos00158.o) : error LNK2026: module unsafe for SAFESEH image.
1>avutil.lib(daoos00237.o) : error LNK2026: module unsafe for SAFESEH image.
1>avutil.lib(daoos00240.o) : error LNK2026: module unsafe for SAFESEH image.
1>avutil.lib(daoos00238.o) : error LNK2026: module unsafe for SAFESEH image.
1>avutil.lib(daoos00235.o) : error LNK2026: module unsafe for SAFESEH image.
1>avutil.lib(daoos00162.o) : error LNK2026: module unsafe for SAFESEH image.
1>avutil.lib(daoos00349.o) : error LNK2026: module unsafe for SAFESEH image.
1>     Creating library C:/SDKs/OgreVideoPlugin-master/build/Debug/OgreVideoPlugin.lib and object C:/SDKs/OgreVideoPlugin-master/build/Debug/OgreVideoPlugin.exp
1>C:\SDKs\OgreVideoPlugin-master\build\Debug\OgreVideoPlugin.dll : fatal error LNK1281: Unable to generate SAFESEH image.
2>------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------
2>Project not selected to build for this solution configuration 
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 1 skipped ==========
*Disabled SAFESEH (linker->advanced), now just getting this...

Code: Select all

1>------ Build started: Project: OgreVideoPlugin, Configuration: Debug Win32 ------
1>     Creating library C:/SDKs/OgreVideoPlugin-master/build/Debug/OgreVideoPlugin.lib and object C:/SDKs/OgreVideoPlugin-master/build/Debug/OgreVideoPlugin.exp
1>FFmpegVideoDecodingThread.obj : error LNK2019: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXABVexception@std@@@Z) referenced in function "void __cdecl boost::conversion::detail::throw_bad_cast<int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(void)" (??$throw_bad_cast@HV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@detail@conversion@boost@@YAXXZ)
1>FFmpegVideoPlayer.obj : error LNK2001: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXABVexception@std@@@Z)
1>FFmpegVideoPlugin.obj : error LNK2001: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXABVexception@std@@@Z)
1>FFmpegVideoPluginDLL.obj : error LNK2001: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXABVexception@std@@@Z)
1>C:\SDKs\OgreVideoPlugin-master\build\Debug\OgreVideoPlugin.dll : fatal error LNK1120: 1 unresolved externals
2>------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------
2>Project not selected to build for this solution configuration 
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 1 skipped ==========
Post Reply