Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6712 Discussions

linking with static libs using /MD multithreaded DLL runtime

jmatthewsr
Beginner
1,438 Views

I am getting the LNK4098 warning about a conflicting LIBCMT usage when linking my app witht he static ipp libraries. Are there static .lib versions that have been built using the /MD runtime library? I am guessing if there is not then the dynamic DLL version of the IPP links to the /MD runtime?

thanks,
-justin

0 Kudos
1 Solution
Ying_H_Intel
Employee
1,438 Views
Quoting - jmatthewsr
Thanks for the response. My application links with the /MD DLL runtime, so I believe I can't link with the static version of IPP without getting this warning. If there was a static version of the IPP library that was built linking with /MD then I couuld link to that version without issues. If this is correct, is there any chance of getting the static version (with dispatching) that links with /MD from intel?

Note that the link mentioned above resolves this similar issue by having intel provide a version ofthe library built with the /MD option.

thanks,

-justin
Hello Justin,

No, if your appliationis only linking IPP static single-thread library with the option /MD, which willlink MSVC runtime library, no other library, thenit should be nota probelm. I need to correct my points about IPP static single-thread library and MSVC runtime library. In commonMSVC environment,user should be free to choose /MD or/MT option, because we try to remove such depencency, the current IPP static (both single and threaded) libraries do notinclude any link MSVC runtime library directly.

(and in the article of __libm_sse2 and _iob, it is about the IPP threaded staticlibrary, which link a "third-party library"static math library: libmmtprovided by Intel compiler, which have dependency with MSVC /MT library).


So is it possible for you attach a small project to show the exactwarning message, IPP version, linked IPP library and build command? is there any other third-party library build with /MD or /MT option in your application?

Regards,
Ying

View solution in original post

0 Kudos
4 Replies
Ying_H_Intel
Employee
1,438 Views
Quoting - jmatthewsr

I am getting the LNK4098 warning about a conflicting LIBCMT usage when linking my app witht he static ipp libraries. Are there static .lib versions that have been built using the /MD runtime library? I am guessing if there is not then the dynamic DLL version of the IPP links to the /MD runtime?

thanks,
-justin


HiJustin,

The static ipp library suppose linking to the /MT runtime, while dynamic dll version of IPP link to /MD runtime. Which runtime library are linked to your application?could you please attach a small test case andthe exact error message?

Here is similiar article for your reference.
http://software.intel.com/en-us/articles/unresolved-external-symbol-libm-sse2/

Regards,
Ying
0 Kudos
jmatthewsr
Beginner
1,438 Views
Thanks for the response. My application links with the /MD DLL runtime, so I believe I can't link with the static version of IPP without getting this warning. If there was a static version of the IPP library that was built linking with /MD then I couuld link to that version without issues. If this is correct, is there any chance of getting the static version (with dispatching) that links with /MD from intel?

Note that the link mentioned above resolves this similar issue by having intel provide a version ofthe library built with the /MD option.

thanks,

-justin
0 Kudos
Ying_H_Intel
Employee
1,439 Views
Quoting - jmatthewsr
Thanks for the response. My application links with the /MD DLL runtime, so I believe I can't link with the static version of IPP without getting this warning. If there was a static version of the IPP library that was built linking with /MD then I couuld link to that version without issues. If this is correct, is there any chance of getting the static version (with dispatching) that links with /MD from intel?

Note that the link mentioned above resolves this similar issue by having intel provide a version ofthe library built with the /MD option.

thanks,

-justin
Hello Justin,

No, if your appliationis only linking IPP static single-thread library with the option /MD, which willlink MSVC runtime library, no other library, thenit should be nota probelm. I need to correct my points about IPP static single-thread library and MSVC runtime library. In commonMSVC environment,user should be free to choose /MD or/MT option, because we try to remove such depencency, the current IPP static (both single and threaded) libraries do notinclude any link MSVC runtime library directly.

(and in the article of __libm_sse2 and _iob, it is about the IPP threaded staticlibrary, which link a "third-party library"static math library: libmmtprovided by Intel compiler, which have dependency with MSVC /MT library).


So is it possible for you attach a small project to show the exactwarning message, IPP version, linked IPP library and build command? is there any other third-party library build with /MD or /MT option in your application?

Regards,
Ying

0 Kudos
jmatthewsr
Beginner
1,438 Views
My builds are working now with /MD.I must have notdone a complete rebuild after changing theusc-speech project that I imported to use /MD instead of /MT.

-justin

0 Kudos
Reply