A link error occured when I link MKL's lapack function from Microsoft vc++ 2005

A link error occured when I link MKL's lapack function from Microsoft vc++ 2005

When I develop my application using MKL's LAPACK routines under Microsoft vc++ 2005 environment, I have the following link problem:

error LNK2019: unresolved external symbol __iob referenced in function ___kmp_background_priority

I am using MKL 7.0 and Microsoft visual stutio 2005. I did the following to link MKL from Microsoft visual studio 2005:

1. Add addtional included directory: ..MKLinclude
2. Add addtional library directory: ..MKLia32lib
3. Add addtional dependency: mkl_c.lib, and mil_lapack.lib

Did I miss any procedure? Any help is appreciated! Thank you! Thank you!

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Try adding libguide.lib to your addtional dependencies.

WL

Hi, WL
Thank you for your reply. I appreciated it. Now I havd added libguide.lib to the additional dependency and got the following link error:

MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
libguide.lib(z_Windows_NT-586_util.obj) : error LNK2019: unresolved external symbol __iob referenced in function ___kmp_background_priority
C:Documents and SettingschaochaoMy DocumentsVisual Studio 2005ProjectsLinearSvDebugLinearSv.exe : fatal error LNK1120: 2 unresolved externals

What should I do now?

ps: LinearSv is my application.

Your version of MKL is much older than VS2005, so they may not have been tested together. As the previous reply indicated, libguide would be an expected dependency, but your message appears to indicate that you already linked libguide. The __iob reference may be to an Intel Fortran run-time library.

Thanks Tim. So, I should not use MKL 7.0 for Lapack under VS2005, right? It seems no way to resolve my problem.

Leave a Comment

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