Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29261 Discussions

Visual Studio 2012 question about lib's

Brian_Murphy
New Contributor II
961 Views

I believe I have succesfully built some LIB files for the ARPACK library.  How do I get VS to include these in the build process for my main program?  Right now I have one VS *.sln file that has a project item for my main program, and project items for each LIB file from which I built the LIB files.  But when I build my main program I get 'unresolved external symbol' for my calls to routines in the LIB's.  I hope it's just something simple that I'm missing.

Thanks,

Brian in Austin, Texas

0 Kudos
6 Replies
Brian_Murphy
New Contributor II
961 Views

In VS2012 in the Project Properties editor, I click the Help button and I get "Cannot find requested topic on your computer".  Does this mean VS is not installed correctly?

0 Kudos
Steven_L_Intel1
Employee
961 Views

You need to set project dependencies. Right click on the executable project and select Project Dependencies. Under "Depends on", check the box for each library project you want linked in.

If you are on a Fortran property page, the Help Viewer should open to show you the Fortran documentation. Can you get at the Fortran help content through the VS Help menu?

0 Kudos
Brian_Murphy
New Contributor II
961 Views
All righty. I set the dependencies, and I'm making progress. Now I'm getting unresolved external's for routines in LAPACK. The Arnoldi ARPACK library from Rice University uses LAPACK, and it comes with code for building LAPACK.LIB, but the IMSL documentation also says it has LAPACK, and my code is using IMSL for other things. Should I just build and link in the LIB that came with ARPACK, or can/should the IMSL fill this requirement? Brian
0 Kudos
Steven_L_Intel1
Employee
961 Views

From what I read, IMSL doesn't include LAPACK, but some of its routines will use an externally supplied LAPACK if you use the _HPC variant set of libraries. Intel MKL does provide optimized LAPACK routines, so maybe what you need to do is enable the "Use MKL" option. Which routines are not getting resolved?

0 Kudos
Brian_Murphy
New Contributor II
961 Views
What the IMSL docs say about LAPACK is a bit fuzzy. Anyhow, I turned on Properties/Fortran/Libraries/Use Intel MKL. What determines if I should pick Parallel, Sequential, or Cluster? As far as I know this code is not doing anything parallel. There are no MPI calls. However, Properties/Fortran/Language/Process Open MP Directives is set to Generate Parallel Code. I do not know why, or what it means, or if it matters. When I build the LAPACK unresolve are gone, but now I get stuff like the following: Error 10 error LNK2005: _for_alloc_allocatable already defined in libifcoremdd.lib(libifcoremdd.dll) libifcoremt.lib(for_vm.obj) Do I need to change some other project setting? Presently the command line string shows /NODEFAULTLIB:"libc" /NODEFAULTLIB:"Libcmtd" Thanks, Brian
0 Kudos
Steven_L_Intel1
Employee
961 Views

I think in general you want to select Parallel for MKL.

You have some project(s) built with the "Use Fortran Run-Time Libraries" option set to the static library (Multithreaded) and others set to use the Multithreaded DLL library. You need to make these consistent. For your library projects, I'd recommend setting Fortran > Libraries > Disable Default Library Search Rules to Yes. This will make it use the executable project's library choice.

0 Kudos
Reply