0

I try to begin a project using Intel Media SDK. But I get some errors during the linkage. I use Microsoft Visual C++ 2008. And I get Intel(R) Media SDK 2019 R1.

I follow the programming guide. https://software.intel.com/sites/default/files/managed/9e/5a/mediasdk-man.pdf

I have include these files:

#include "mfxvideo.h" /* The SDK include file */
#include "mfxvideo++.h" /* Optional for C++ development */

And link this Library:

libmfx.lib

I adding a new library to a project Configuration properties -> VC++ Directories -> Library Directories and here I specified additional folder for searching libraries.

Path : Program Files (x86)\IntelSWTools\Intel(R) Media SDK 2019 R1\Software Development Kit\lib\win32" I try also with : C:\Program Files (x86)\IntelSWTools\Intel(R) Media SDK 2019 R1\Software Development Kit\lib\x64

and adding in Configuration properties -> Linker -> Input the specific name of the Library libmfx.lib.

My code:

#include "stdafx.h"
#include "mfxvideo.h" /* SDK functions in C */
#include "mfxvideo++.h" /* optional for C++ development */
#include "mfxplugin.h" /* plugin development */

int _tmain(int argc, _TCHAR* argv[])
{
  MFXVideoSession session;
    return 0;
}

My error message :

1>Linking... 1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library

1>libmfx.lib(mfx_load_dll.obj) : error LNK2019: unresolved external symbol __imp__SetThreadErrorMode@8 referenced in function "void * __cdecl MFX::mfx_dll_load(wchar_t const *)" (?mfx_dll_load@MFX@@YAPAXPB_W@Z)

1>libmfx.lib(mfx_dxva2_device.obj) : error LNK2001: unresolved external symbol __imp__SetThreadErrorMode@8

1>D:\slegrand\MediaSDKandFFMPEG2\SDKandFFMPEG\Debug\SDKandFFMPEG.exe : fatal error LNK1120: 1 unresolved externals

Thank you for your help.

  • `LIBCMT` is the static multi-threaded C runtime support library. The error is because `libmfx.lib` was compiled for a different runtime support library. There are 4 possible combinations: Debug/Release and Static/Dynamic – Richard Critten Oct 24 '19 at 12:49
  • Please, have a look at this [SO thread](https://stackoverflow.com/questions/14148933/libcmt-conflicts-with-use-of-other-libs-unresolved-external-symbols). Look at the answer given by Adrian McCarthy. Maybe the suggestions given in that answer can help you. – dorKKnight Oct 24 '19 at 12:54
  • So I try to configure libmfx.lib in all configuration in the property but that does'nt work – sacha legrand Oct 24 '19 at 12:57
  • Wath should I do with the .dll files ?? I change the Platform in the configuration manager Win32 to x64. And now I get this error messages : 1>libmfx.lib(mfx_load_dll.obj) : error LNK2019: unresolved external symbol __imp_SetThreadErrorMode referenced in function "void * __cdecl MFX::mfx_dll_load(wchar_t const *)" (?mfx_dll_load@MFX@@YAPEAXPEB_W@Z) 1>libmfx.lib(mfx_dxva2_device.obj) : error LNK2001: unresolved external symbol __imp_SetThreadErrorMode – sacha legrand Oct 24 '19 at 13:58
  • `defaultlib 'LIBCMT' conflicts ... use /NODEFAULTLIB:library` might point to a CRT(C runtime library) conflict. This might be because you are trying to build the latest SDK code( guessing by this path "...IntelSWTools\Intel(R) Media SDK 2019") with and old compiler so you can try using a version of the SDK compatible with your compiler OR use the updated compiler to build these samples. – dorKKnight Oct 25 '19 at 04:53

0 Answers0