vs 2013 ffmpegの20 openalのコンパイル


openal
ffmpeg configureオプション–enable-openalに対応します.
http://www.openal.org/www.openal-softでソースコード(事前にコンパイルされたパッケージのみ)が見つかりません.orgにはソースコード、バージョンopenal-soft-1.15.1がダウンロードされています.これで問題が発生する可能性がありますが、この機能は検証されていません.
コンパイルエラー1
リンク中に次のエラーが発生しました.
libavdevice.a(openal-dec.o) : error LNK2019: unresolved external symbol impalcGetString referenced in function _al_get_error

libavdevice.a(openal-dec.o) : error LNK2019: unresolved external symbol impalcGetError referenced in function _al_get_error

libavdevice.a(openal-dec.o) : error LNK2019: unresolved external symbol impalcCaptureStart referenced in function _read_header

libavdevice.a(openal-dec.o) : error LNK2019: unresolved external symbol impalcCaptureCloseDevice referenced in function _read_header

libavdevice.a(openal-dec.o) : error LNK2019: unresolved external symbol impalcCaptureOpenDevice referenced in function _read_header

libavdevice.a(openal-dec.o) : error LNK2019: unresolved external symbol impalcCaptureSamples referenced in function _read_packet

libavdevice.a(openal-dec.o) : error LNK2019: unresolved external symbol impalcGetIntegerv referenced in function _read_packet

libavdevice.a(openal-dec.o) : error LNK2019: unresolved external symbol impalcCaptureStop referenced in function _read_close

Openal-dec.oのシンボルテーブルから(nmコマンドでシンボルテーブルをエクスポートできる):
U __imp__alcGetString
Openal-dec.cから見ると
error_msg_ret = (const char) alcGetString(device, error);

呼び出し時にimp接頭辞はありません.Openalソースの中のal.h/alc.hには、
#ifndef ALC_API

 #if defined(AL_LIBTYPE_STATIC)

  #define ALC_API

 #elif defined(_WIN32)

  #define ALC_API __declspec(dllimport)

 #else

  #define ALC_API extern

 #endif

#endif

Openal-dec.cでal.h/alc.hの前に、#define AL_を付けるLIBTYPE_STATICは問題ありません.他のライブラリはnmで出力されたシンボルテーブルを用い,対外インタフェースには各シンボルに対応するimp接頭辞を付けたシンボルがある.
コンパイルエラー2
Openal-soft-1.15.1のopenal-infoをコンパイルします.exeの場合、次の印刷があります.
2>openal-info.obj : error LNK2001: unresolved external symbol impalcCloseDevice

2>openal-info.obj : error LNK2001: unresolved external symbol impalcDestroyContext

2>openal-info.obj : error LNK2001: unresolved external symbol impalcMakeContextCurrent

2>openal-info.obj : error LNK2001: unresolved external symbol impalcCreateContext

2>openal-info.obj : error LNK2001: unresolved external symbol impalcOpenDevice

2>openal-info.obj : error LNK2001: unresolved external symbol impalcGetString

2>openal-info.obj : error LNK2001: unresolved external symbol impalcIsExtensionPresent

2>openal-info.obj : error LNK2001: unresolved external symbol impalcGetIntegerv

2>openal-info.obj : error LNK2001: unresolved external symbol impalcGetError

2>openal-info.obj : error LNK2001: unresolved external symbol impalGetString

2>openal-info.obj : error LNK2001: unresolved external symbol impalGetError

2>openal-info.obj : error LNK2001: unresolved external symbol impalGetEnumValue

同じ解決策ですopenal-infoですc先頭に#define ALを付けるLIBTYPE_STATIC.
##コンパイルエラー3##
コンパイルffmpeg_gの場合、次のエラーが発生します.
OpenAL32.lib(null.obj) : error LNK2001: unresolved external symbol imptimeGetTime@0

SDL.lib(SDL_systimer.obj) : error LNK2019: unresolved external symbol imptimeBeginPeriod@4 referenced in function _SDL_StartTicks

SDL.lib(SDL_systimer.obj) : error LNK2019: unresolved external symbol imptimeSetEvent@20 referenced in function _SDL_SYS_TimerInit

SDL.lib(SDL_systimer.obj) : error LNK2019: unresolved external symbol imptimeEndPeriod@4 referenced in function _SDL_SYS_TimerQuit

SDL.lib(SDL_systimer.obj) : error LNK2019: unresolved external symbol imptimeKillEvent@4 referenced in function _SDL_SYS_TimerQuit

SDL.lib(SDL_dx5video.obj) : error LNK2001: unresolved external symbol _GUID_POV

WinMM.Lib Gdi32.lib dxguid.libチェーンが入っていればいいです.
enabled openal            && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do

                               check_lib 'AL/al.h' alGetError "${al_libs}"  && break; done } ||

変更:
enabled openal            && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do

                               check_lib 'AL/al.h' alGetError "${al_libs}" -lWinMM -lUser32 -lole32 && break; done } ||

dxguidを追加しました.libの後に新しい問題がありました.dxguidのためです.libは/MTでコンパイルされ、他のライブラリとffmpegは/MTdでコンパイルされ、ffmpeg_をコンパイルします.g.exeの場合、エラーが発生します.
LIBCMT.lib(invarg.obj) : error LNK2005: __initp_misc_invarg already defined in LIBCMTD.lib(invarg.obj)

dxguidがないからです.libのソースコードなので、/NADEFAULTLIB:LIBCMTDしか加算できません.libが解決します.
コンパイルエラー4
vs 2013+ffmpeg-3.3、前のopenalはvs 2010でコンパイルされ、vs 2013でcmakeを再実行する必要があり、コンパイル時に次のエラーが発生しました.
./CMakeFiles/CMakeError.log:26:LINK : fatal error LNK1146:      “/L/usr/win32/lib:”      [K:\MinGW\msys\1.0\home\AA\contribute\MSVC\openal-soft-1.15.1\CMakeFiles\CMakeTmp\cmTC_550b6.vcxproj]

この追加のオプションはLinkerオプションの中にあります.直接削除すればいいです.vs2013编译ffmpeg之二十 openal_第1张图片