Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

VC++ 2005: static library containing MKL

jd_weeks
Beginner
757 Views
I am trying to build a static library that includes calls to MKL. This library will be used by others to build applications that depend on code that uses MKL.

I made a static library project, added my C++ source files, and included mkl_c.lib, mkl_ia32.lib, mkl_lapack.lib and libguide.lib as inputs to the static library.

Building the static library results in a number of warnings of duplicate symbols. Is this because of multiple architecture implementations in MKL? How do I resolve this?

Building an application using this library complains "cannot open file mkl_ia32.lib". Why would the application be looking for mkl_ia32.lib? How can I fix this?

Thanks in advance!
0 Kudos
3 Replies
eddy_alonso
Beginner
757 Views
Quoting - jd_weeks
I am trying to build a static library that includes calls to MKL. This library will be used by others to build applications that depend on code that uses MKL.

I made a static library project, added my C++ source files, and included mkl_c.lib, mkl_ia32.lib, mkl_lapack.lib and libguide.lib as inputs to the static library.

Building the static library results in a number of warnings of duplicate symbols. Is this because of multiple architecture implementations in MKL? How do I resolve this?

Building an application using this library complains "cannot open file mkl_ia32.lib". Why would the application be looking for mkl_ia32.lib? How can I fix this?

Thanks in advance!

0 Kudos
eddy_alonso
Beginner
757 Views
Quoting - jd_weeks
I am trying to build a static library that includes calls to MKL. This library will be used by others to build applications that depend on code that uses MKL.

I made a static library project, added my C++ source files, and included mkl_c.lib, mkl_ia32.lib, mkl_lapack.lib and libguide.lib as inputs to the static library.

Building the static library results in a number of warnings of duplicate symbols. Is this because of multiple architecture implementations in MKL? How do I resolve this?

Building an application using this library complains "cannot open file mkl_ia32.lib". Why would the application be looking for mkl_ia32.lib? How can I fix this?

Thanks in advance!

Did you get an answer? I have exactly the same problem. I embed mkl functionality in one library mylib.lib by linking statically to mkl_c.lib. When I try to link to mylib.lib from another application, I get LNK1104: cannot open file 'mkl_ia32.lib' I am using the 9.1.025 version. Can anyone help me? Thanks in advance

0 Kudos
Gennady_F_Intel
Moderator
757 Views

Alonso,

You dont need to explicitly link mkl_ia32.lib.

I would recommend you to look in MKL Users Guide, there you can find a lot of Linking Examples (see Chapter 5) as well our Note on Linking with libguide.

I hope it will help you to resolve the problem.

--Gennady

0 Kudos
Reply