SDK Multi-theaded DLL

SDK Multi-theaded DLL

Reposting Pallav's Post here Hi, I have an application (game) which is linked to a library which is compiled with the runtime library being: multithreaded debug. Linking with Appstore SDK with this runtime seems to throw a lot of linker errors. I can't change the library compilation options. Is there anyway I can use the multithreaded debug/multithreaded runtimes? Here are examples of errors I am seeing: 1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_String_val >::~_String_val >(void)" (??1?$_String_val@DV?$allocator@D@std@@@std@@QAE@XZ) already defined in ic_respop.obj 1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "protected: void __thiscall std::basic_string,class std::allocator >::_Tidy(bool,unsigned int)" (?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEX_NI@Z) already defined in ic_respop.obj 1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "protected: __thiscall std::_String_val >::_String_val >(class std::allocator)" (??0?$_String_val@DV?$allocator@D@std@@@std@@IAE@V?$allocator@D@1@@Z) already defined in ic_respop.obj 1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::allocator::allocator(void)" (??0?$allocator@D@std@@QAE@XZ) already defined in ic_respop.obj
7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

We have the same problem:

The reason is clear: the adk lib is linked against dynamically CRT ( /MD ).

The explanation in the FAQ is not correct I think.

Before having a statically linked version of the adk lib we will not be able to create
our solution.

We definitely do NOT want to link against dynamic MFC.dll

Any combination of linker ignore / add flags did not help. Maybe any other workaround?

Regards, Oliver

Hello All,

as Brian said we had the topic with dynamic/static linking before in this forum. This has been a design decision made by the SDK Team. If upcoming versions of the SDK will offer more choices is something we need to see over time. Of course we are aware of these requests but at this time cannot promise any changes.

Best Regards

Andre B.

Technical Support Team
Intel® Atom™ Developer Program
Intel® AppUp(SM) Center

Based on discussion with Pallav. The problem is this: Intel SDK libraries have the 'Multi-theaded DLL' runtime, and the existing code uses 'Multithreaded' (static) linking. Can you guys can provide us with statically linked debug and release libraries, then it will go smoothly.

Hi Rohan,
a tricky solution is to build a DLL upon the IADP SDK that incorporates it's basic functionality,and calling the necessary routines from it
using win23 dll C api [LoadLibrary(), FreeLibrary(), GetProcAddress()].this will make you bypass The application Linking time without any conflict between the IADP SDK libs and your other third party libs,as in this way The IADP run time will loads dynamicaly.
for more info about win32 dll see:
http://msdn.microsoft.com/en-us/library/ms682589(VS.85).aspx

Hi,

MFC static linking is still not possible using AppUp 1.1.2 SDK. Any news regarding this one?

Many thanks
Ivan

Rohan,

In response to your technical issue:

Error: "MSVCRT.lib(MSVCR90.dll) : error LNK2005: ... already defined in LIBCMT.lib(....obj)"

Solution: Ensure that you are not including the CRT runtime libraries multiple times. This usually happens when you have integrated code that is already statically linked to the CRT runtime. The solution may be as simple as changing the /MD compiler switch to /MT. This effectively links against the static CRT runtime rather than the DLL CRT runtime. More information on this may be found on MSDN: http://msdn.microsoft.com/en-us/library/2kzt1wy3%28VS.80%29.aspx

URL: http://appdeveloper.intel.com/en-us/blog/2010/01/13/where-look-when-your-app-wont-compile

There have been a few threads here on the forums regarding your request. I believe the suggestion has been raised to the SDK team for discussion. Ultimately we will have to wait and see what the final version of the ATOM SDK brings for us. Please let me know if you continue to receive compiler/linker errors.

Leave a Comment

Please sign in to add a comment. Not a member? Join today