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

Problem: Link 1104: cannot open file 'C:\\Program.obj' ..VisualStudio 2008 C++ Windows 7 .. 64 bit.

Paul_Margosian
Beginner
1,853 Views
Using Visual Studio 2008, C++
Trying an "example" to test matrix inversion:

info = LAPACKE_zgesv( LAPACK_ROW_MAJOR, n, nrhs, a, lda, ipiv, b, ldb );

Seeking a static link.
Have pointed linkerto the libraries suggested in the user manual for Math Kernel Library
(mkl_intel_lp64.lib, mkl_intel_thread.lib, mkl_core.lib, libiomp5md.lib)

No matter what I try, get the error:

LINK : fatal error LNK1104: cannot open file 'C:\\Program.obj'

Help! I'm stuck.

Paul Margosian

0 Kudos
7 Replies
Naveen_G_Intel
Employee
1,853 Views
Hi Paul,
This could be because of Visual studio property settings, can you check values of "Additional library directories", each values should be separated by semicolon.

Regards,
Naveen Gv
0 Kudos
Paul_Margosian
Beginner
1,853 Views

Naveen,

Thanks for the effort. Tried semicolons. Made things worse. either spaces or CR LF (i.e. list a different library name on each line) work the same .. and give the same error.

Build log shows that the linker found the lib files. Pasted a relevant part of it below.

Creating temporary file "c:\Users\margosianp\Documents\Visual Studio 2008\Projects\GrappaTesting\GrappaTesting\x64\Debug\TMP00000857202952.tmp" with contents
[
1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ ".\\x64\\Debug\\GrappaTesting.exe.embed.manifest"
]
Creating command line "rc.exe /fo".\x64\Debug\GrappaTesting.exe.embed.manifest.res" "c:\Users\margosianp\Documents\Visual Studio 2008\Projects\GrappaTesting\GrappaTesting\x64\Debug\TMP00000857202952.tmp""
Creating temporary file "c:\Users\margosianp\Documents\Visual Studio 2008\Projects\GrappaTesting\GrappaTesting\x64\Debug\RSP00000957202952.rsp" with contents
[
/OUT:"C:\Users\margosianp\Documents\Visual Studio 2008\Projects\GrappaTesting\x64\Debug\GrappaTesting.exe" /INCREMENTAL /MANIFEST /MANIFESTFILE:"x64\Debug\GrappaTesting.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\margosianp\Documents\Visual Studio 2008\Projects\GrappaTesting\x64\Debug\GrappaTesting.pdb" /SUBSYSTEM:CONSOLE /DYNAMICBASE /NXCOMPAT /MACHINE:X64 libfftw3-3.lib C:\Program Files\(x86)\Intel\ComposerXE-2011\mkl\lib\intel64\mkl_intel_lp64.lib Files\(x86)\Intel\ComposerXE-2011\mkl\lib\intel64\mkl_intel_thread.lib Files\(x86)\Intel\ComposerXE-2011\mkl\lib\intel64\mkl_core.lib Files\(x86)\Intel\ComposerXE-2011\mkl\lib\intel64\libiomp5md.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib





Mystery remains.

Paul Margosian

0 Kudos
Gennady_F_Intel
Moderator
1,853 Views
Paul,
1)
please change the line
Files\(x86)\Intel\ComposerXE-2011\mkl\lib\intel64\libiomp5md.lib
by the following:
Files\(x86)\Intel\ComposerXE-2011\compiler\lib\intel64\libiomp5md.lib

2) then,
please see at this article, may be it will useful.
3) libfftw3-3.lib - are you going to link with fftw3 wrappers?
--Gennady
0 Kudos
Paul_Margosian
Beginner
1,853 Views
Gennady,

1) You have sharp eyes. Corrected the path and linker found the last lib file.
Still got the same error message.

2) Article looks promising. Will study and see whether it helps. Have 10.2 version. Will probably upgrade to 10.3 (tried this morning. had network problems and didn't get it yet).

3) Have been using fftw (separately) for some time. Just got MKL. Need to solve systems of linear equations, do some convolutions, etc. No special need to switch to the MKL version of fftw at this time.

Paul Margosian
0 Kudos
Paul_Margosian
Beginner
1,853 Views
Gennady,

This morning upgraded to MKL 10.3.

Same linker error.

Paul Margosian
0 Kudos
VipinKumar_E_Intel
1,853 Views

Can you try setting the path in quotes, like "C:\Program Files\(x86)\Intel\ComposerXE-2011\mkl\lib\intel64" in additional library dependencies under Project Properties?

-Vipin

0 Kudos
Paul_Margosian
Beginner
1,853 Views
Vipin,

You got it! Just had to add the trailing "" before the final quote and magic happened. Also had to re-enter all the characters for it to work. You seem to know some deep secrets about Visual Studio.

This solution seems so peculiar that itfeels analagous to burning incense. Success is great, I'll take it.

Thanks.

Paul Margosian


Couldn't figure out how to flag this as "best answer" .. but it is since it works.
0 Kudos
Reply