unresolved external symbol __libm_sse2 and _iob

Symptom(s):

When linking with the static threaded version of IPP libraries, e.g ippiemergedem64t.lib ippimergedem64_t.lib, you may receive the following error:

ippimergedem64t_t.lib(piwarp_split_mx_ippiGetRotateShift.obj) : error LNK2019: unresolved external symbol __libm_sse2_sincos referenced in function mx_ippixxx

Cause:

The symbol is defined in the Intel Math library libm*.lib provided by Intel® C++ Compiler. The Math library contains highly optimized mathematical functions, such as sin(), cos(). Some IPP functions depend on them.

Library Option Description
libm.lib Default static math library.
libmmt.lib /MT Multi-threaded static math library.
libmmd.lib /MD Dynamically linked math library.
libmmdd.lib /MDd Dynamically linked debug math library.
libmmds.lib Static version compiled with /MD option.

Solution:

Link the libmmt.lib in your application.

IPP bundles the library libmmt.lib/libm.lib in directory lib, by default they are in C:\Program Files\Intel\IPP\6.0.0.xx\[em64t|ia32]\lib.

Please note, we assume that the applicatoin is built with /MT option here.  The Intel math library linked to an application depends on the compilation or linkage options specified. Refer to the above table.

Troubleshooting
After linking libmmt.lib, a sequential error may appear:

libmmt.lib(libm_error.obj) : error LNK2019: unresolved external symbol _iob referenced in function write_message 

The symbol _iob is defined in the MSVC static C run-time library libcmt.lib.  When using IPP static threaded library in MSVC, we assume that the application is built with the /MT option, thus link libcmt.lib automatically.  
 
But one application or its parts may have been built with the /MD option, which will link MSVC dynamic C run-time library MSVCRT*.dll,which does not have the symbol defined. In this case, please link libmmds.lib instead.

libmmds.lib -  Static math library version compiled with /MD option, which is provided by Intel Compiler.

Notes:
Both Intel Profession Compiler and Intel Parallel Composer include IPP library and the Intel Math Libraries. You may find them in their install directory.  
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.