- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am not able to link my program which uses media sdk and STL together on windows. I am using visual studio 2015. I am able to link only if I specify /MT instead of /MD, however I need to specify /MD since /MT is not compatible "Consume windows run-time library" - that I need to enable.
A small sample code like below gives error "error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease". Note that this error goes away if I remove either usage of STL (string) or mfx. Also this goes away if I use /MT switch - but I can't
#include <stdio.h>
#include <string>
#include <mfxvideo.h>
using std::string;
int main()
{
string test("hello");
printf("%s\n", test.c_str());
mfxIMPL impl = MFX_IMPL_AUTO;
mfxVersion ver = { { 0, 1 } };
mfxSession session;
mfxStatus status = MFXInit(impl, &ver, &session);
return 0;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ashim,
If you need to use /MD setting in you app build, you will need to rebuild dispatcher from source with /MD option and use it instead of dispatcher version provided in release package (which is built with /MT). Source code to dispatcher lib is available at MediaSDK installed directory (<\opensource\mfx_dispatch>\). Using the same setting in dispatcher and app will work.
Thanks,
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ashim,
MediaSDK DLL libraries are updated with every driver release. Let me check with our team on your use case usage and get back to you soon.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ashim,
If you need to use /MD setting in you app build, you will need to rebuild dispatcher from source with /MD option and use it instead of dispatcher version provided in release package (which is built with /MT). Source code to dispatcher lib is available at MediaSDK installed directory (<\opensource\mfx_dispatch>\). Using the same setting in dispatcher and app will work.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. Building the library from the opensource directory has solved the problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad, resolved the issue. Closing this thread.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page