Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Wei_Z_Intel
Employee
152 Views

see lots of warnings when compile Lib with MKL used

Hi,

         I recently create and build a lib on window host with mkl lib function used, however, I see lots of weird warnings ,  can you tell me how to get rid of them, thanks a lot.  I included below mkl header files:

#include <mkl.h>
#include <mkl_dfti.h>

        I used mkl buffer allocate and free, fft etc functions, it reported like 8000 plus warning, I extracted part of them as below.

1>mkl_intel_thread_dll.lib(mkl_intel_thread.dll) : : warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in mkl_intel_ilp64_dll.lib(libimalloc.dll); second definition ignored
1>mkl_intel_thread_dll.lib(mkl_intel_thread.dll) : : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
1>mkl_core_dll.lib(mkl_core.dll) : : warning LNK4006: sdttrsb_4dfl already defined in mkl_intel_ilp64_dll.lib(_sdttrsb_4dfl_lp64.obj); second definition ignored
1>mkl_core_dll.lib(mkl_core.dll) : : warning LNK4006: sdttrfb_4dfl already defined in mkl_intel_ilp64_dll.lib(_sdttrfb_4dfl_lp64.obj); second definition ignored

....

1>  Appending libimalloc.dll
1>  Appending libimalloc.dll
1>  Appending libimalloc.dll
1>  Appending libimalloc.dll
1>  Appending libimalloc.dll
1>  Appending libimalloc.dll
1>  Appending libimalloc.dll
1>  Appending _set_workdivision_ilp64.obj
1>  Appending _set_resource_limit_ilp64.obj
1>  Appending _set_offload_report_ilp64.obj

... 

            If I used exe rather than lib, it will not report any warning as above, could you tell me how to disable these warnings?

            I used vs2013, intel parallel studio xe2015,latest mkl version.

 

Thank you

John

0 Kudos
2 Replies
Ying_H_Intel
Employee
152 Views

Hi John,

Thanks for the report. I recalled we have the threads discuss build the custom static library. but can't found the threads. But basically, the warning are not hurtless and mkl have cross-reference internally. On the  other hand, we don't recommend to build static library based on MKL static library or MKL dynamic library ( because even you build, you still need all of the MKL library when you link the custom static library to your exe)  .  That is why MKL provide custom build tool under Intel\Composer XE 2015\mkl\tools\builder\MSVS_Projects for such purpose.   Have you any special reason to build your own static lib project?  

Best Regards,

Ying

Wei_Z_Intel
Employee
152 Views

Hi Ying, Ok, thank you, previously I thought I missed sth, which caused lots of warnings. Thank you John
Reply