- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am getting following error while writing the program given below. Please help me identify the problem.
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol _MFXInit referenced in function _main HelloWorld_Intel_SDK *\Visual Studio\Projects\HelloWorld_Intel_SDK\HelloWorld_Intel_SDK\Source.obj 1
Error LNK2019 unresolved external symbol _MFXClose referenced in function _main HelloWorld_Intel_SDK *\Visual Studio\Projects\HelloWorld_Intel_SDK\HelloWorld_Intel_SDK\Source.obj 1
Error LNK2019 unresolved external symbol _MFXQueryVersion referenced in function _main HelloWorld_Intel_SDK *\Visual Studio\Projects\HelloWorld_Intel_SDK\HelloWorld_Intel_SDK\Source.obj 1
Error LNK1120 3 unresolved externals HelloWorld_Intel_SDK *\Visual Studio\Projects\HelloWorld_Intel_SDK\Debug\HelloWorld_Intel_SDK.exe 1
#include"mfxvideo.h"
#include<stdio.h>
int main() {
mfxVersion SWversion = { 0,1 }, HWversion = { 0,1 }, version;
mfxSession SWsession, HWsession;
mfxStatus sts;
sts = MFXInit(MFX_IMPL_SOFTWARE, &SWversion, &SWsession);
if (MFX_ERR_NONE == sts)
{
MFXQueryVersion(SWsession, &version);
printf("For Software implementation\nSW version: %d.%d \n API level: %d.%d\n\n\n",
SWversion.Major, SWversion.Minor, version.Major, version.Minor);
}
sts = MFXInit(MFX_IMPL_HARDWARE, &HWversion, &HWsession);
if (MFX_ERR_NONE == sts)
{
MFXQueryVersion(HWsession, &version);
printf("For Hardware implementation\nSW version: %d.%d \n API level: %d.%d\n\n\n",
HWversion.Major, HWversion.Minor, version.Major, version.Minor);
}
MFXClose(SWsession);
MFXClose(HWsession);
}
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[for VS2015] To solve this issue make sure to include all the dependencies by right-clicking on the Project in the property.
If you are still stuck then read this https://www.codeproject.com/Questions/1163428/Error-LNK-using-visual-studio-RC or http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix
If these answers don't help then leave a message here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you have an environment issue.
property->linker and make sure "libmfx.lib" is in the linking command line.
Mark
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page