Calling Clapack functions in Visual Studio 2008 / Windows XP

Post here if you are having problem installing LAPACK on a Windows machine

Re: Calling Clapack functions in Visual Studio 2008 / Windows XP

Postby jocheno » Wed Aug 26, 2009 3:15 am

I changed the following setting under
Project options -> Configuration Properties -> C/C++ -> Code generation -> Use run-time library
from "Multithreaded-Debug-DLL (/MDd)" (which seems to be the default setting!?) to "Multithreaded-Debug (/MTd)".

Now the project using BLAS.lib and LAPACK.lib compiles and links successfully and I can properly execute the generated .exe file!!!

I don't know what exactly the run-time library settings "Multithreaded-Debug-DLL" and "Multithreaded-Debug" do, but it works. Strangely the setting "Multithread (/MT)" does not work (the linker then isn't even able to resolve symbols like getchar() or printf()), even though I am using the release versions of BLAS.lib and LAPACK.lib (instead of the debug version BLASd.lib and LAPACKd.lib)!? Does that have anything to do with each other?

Using BLASd.lib and LAPACKd.lib stills leads to an array of errors during the linking process (non resolvable symbols such as "logf" and "powr8i4" in the "lapackd.lib" and symbols such as "qw32used" and "QWINNiceExit" in "libifcoremt.lib")???
jocheno
 
Posts: 19
Joined: Mon Aug 10, 2009 3:37 am

Re: Calling Clapack functions in Visual Studio 2008 / Windows XP

Postby jocheno » Wed Aug 26, 2009 3:28 am

I now also successfully compiled, linked and ran the project using my optimised BLAS library libgoto_core2-r1.26.lib, both with the upper case and the lower case definition of the dgesv routine.

What can I say. I guess that's it for this thread now. Still, I would be happy to learn about that last run-time library setting, what it does and why "Multithreaded-Debug (/MTd)" works and "Multithreaded (/MT)" doesn't...

Anyway. Thank you Olumide for your help and all the time and effort you spent on my problems! I am pretty sure I will speak to you again about more practical problems when I am actually trying to use LAPACK now ;-)

Take care!

Jochen
jocheno
 
Posts: 19
Joined: Mon Aug 10, 2009 3:37 am

Re: Calling Clapack functions in Visual Studio 2008 / Windows XP

Postby graphicsRat » Wed Aug 26, 2009 11:33 am

I'm glad to hear you've solved the problem :-) . It was a due to your project-settings as I suspected! I'll add that bit of information to the HOWTO. There are a few Wikipedia articles on runtime systems and libraries. These should set the stage for the following Visual Studio specific articles:

http://www.davidlenihan.com/2008/01/cho ... untim.html
http://msdn.microsoft.com/en-us/library ... 80%29.aspx

Lastly, can you confirm that Fortran libraries are not required in order to use the LAPACK and BLAS libraries in C/C++ (I don't believe they are).

Here's something I just discovered, which you may find useful: clapack.h (you'll find this file in the include folder of the CLAPACK source) contains the list of all LAPACK C function prototypes, albeit without the extern "C" directives which must be prepended to each declaration if you're programming in C++.
graphicsRat
 
Posts: 84
Joined: Wed Mar 25, 2009 3:08 pm

Previous

Return to Windows

Who is online

Users browsing this forum: No registered users and 2 guests