1. Obtain the library at http://www.netlib.org/clapack/
(Mar 2005) The version I recommend is version 3. The file size is huge because it includes src code and compiled library (both debug and release mode).
2. Set up VC project and use 'Multithreaded DLL' for runtime library.
3. Edit the header file 'clapack.h' to extern "C" api. This is required for C++ project.
4. Put the libary files in appropriate location and add them as 'additional dependencies'.
For example, I put them in 'Visual Studio solution' directory at Lib/Release; the additional dependencies will be
odbc32.lib odbccp32.lib ../Lib/Release/blas.lib ../Lib/Release/libF77.lib ../Lib/Release/libI77.lib ../Lib/Release/clapack.lib
5. Standard libraries we are going to use may conflict each other. Order of inclusion is very important. The following code is a working example of inclusion:
#include
using namespace std;
#include
#include
#include "f2c.h"
#include "clapack_extern.h"
6. You might need some good document:
6.1. For guideline of what's going on inside Lapack:
http://www.netlib.org/lapack/lug/index.html
The guide is official book of Lapack routine, but it's not API reference.
6.2. For API reference:
http://www.math.utah.edu/software/lapack/
No comments:
Post a Comment