- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I am trying to build a C++ main program which will call the Fortran subroutine built to static library, the libraries linked to the project are:
fortranlib.lib mkl_solver.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5mt.lib cxx.lib mpi.lib fmpich2.lib mkl_scalapack_core.lib mkl_blacs_mpich2.lib
However, the following errors appeared when built the project:
error LNK2001: unresolved external symbol _for_array_copy_in
error LNK2001: unresolved external symbol _for_array_copy_out
Other settings of the project are as follows:
C++->Command line:
/I "C:\Program Files\Intel\MKL\10.1.0.018\include\"/FD /EHsc /MT /Fo"Release_mpi\" /Fd"Release_mpi\vc90.pdb" /nologo /c /TP /errorReport:prompt
Linker->Command line:
/OUT:"\test.exe" /NOLOGO /LIBPATH:"C:\Program Files\MPICH2\lib" /LIBPATH:"C:\Program Files\Intel\MKL\10.1.0.018\ia32\lib\" /LIBPATH:"Lib32" /LIBPATH:"C:\Program Files\Intel\Compiler\11.0\066\fortran\lib\ia32" /MANIFEST /MANIFESTFILE:"Release_mpi\test.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DYNAMICBASE:NO /ERRORREPORT:PROMPT fortranlib.lib mkl_solver.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5mt.lib cxx.lib mpi.lib fmpich2.lib mkl_scalapack_core.lib mkl_blacs_mpich2.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
Could anyone tell me what lead to the problem?
Thanks,
Zhanghong Tang
I am trying to build a C++ main program which will call the Fortran subroutine built to static library, the libraries linked to the project are:
fortranlib.lib mkl_solver.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5mt.lib cxx.lib mpi.lib fmpich2.lib mkl_scalapack_core.lib mkl_blacs_mpich2.lib
However, the following errors appeared when built the project:
error LNK2001: unresolved external symbol _for_array_copy_in
error LNK2001: unresolved external symbol _for_array_copy_out
Other settings of the project are as follows:
C++->Command line:
/I "C:\Program Files\Intel\MKL\10.1.0.018\include\"/FD /EHsc /MT /Fo"Release_mpi\" /Fd"Release_mpi\vc90.pdb" /nologo /c /TP /errorReport:prompt
Linker->Command line:
/OUT:"\test.exe" /NOLOGO /LIBPATH:"C:\Program Files\MPICH2\lib" /LIBPATH:"C:\Program Files\Intel\MKL\10.1.0.018\ia32\lib\" /LIBPATH:"Lib32" /LIBPATH:"C:\Program Files\Intel\Compiler\11.0\066\fortran\lib\ia32" /MANIFEST /MANIFESTFILE:"Release_mpi\test.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DYNAMICBASE:NO /ERRORREPORT:PROMPT fortranlib.lib mkl_solver.lib mkl_intel_c.lib mkl_intel_thread.lib mkl_core.lib libiomp5mt.lib cxx.lib mpi.lib fmpich2.lib mkl_scalapack_core.lib mkl_blacs_mpich2.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
Could anyone tell me what lead to the problem?
Thanks,
Zhanghong Tang
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The easiest solution is to change the Fortran property "Libraries > Disable default library search rules" from Yes to No and then rebuild. You'll also want to make sure that the Runtime Library setting for the Fortran project is "Multithreaded" and not any of the other options such as "Debug Multithreaded".
Otherwise, add ifcore.lib and ifconsol.lib to the list of libraries.
Otherwise, add ifcore.lib and ifconsol.lib to the list of libraries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
The easiest solution is to change the Fortran property "Libraries > Disable default library search rules" from Yes to No and then rebuild. You'll also want to make sure that the Runtime Library setting for the Fortran project is "Multithreaded" and not any of the other options such as "Debug Multithreaded".
Otherwise, add ifcore.lib and ifconsol.lib to the list of libraries.
Otherwise, add ifcore.lib and ifconsol.lib to the list of libraries.
Dear Steve,
Thank you very much for your reply. I checked the fortran project and the settings of the project is just what you said. I tried to add "libifcoremt.lib ifconsol.lib" (I guess the "ifcore.lib" should be the "libifcoremt.lib"), the errors are still here.
Thanks,
Zhanghong Tang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
The easiest solution is to change the Fortran property "Libraries > Disable default library search rules" from Yes to No and then rebuild. You'll also want to make sure that the Runtime Library setting for the Fortran project is "Multithreaded" and not any of the other options such as "Debug Multithreaded".
Otherwise, add ifcore.lib and ifconsol.lib to the list of libraries.
Otherwise, add ifcore.lib and ifconsol.lib to the list of libraries.
Dear Steve,
Thank you very much for your reply. I checked the fortran project and the settings of the project are just what you said. I tried to add "libifcoremt.lib ifconsol.lib" (I guess the "ifcore.lib" should be the "libifcoremt.lib"), the errors are still here.
Thanks,
Zhanghong Tang

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page