CLAPACK 3.2.1 with Visual Studio 2010

Memo on how to install CLAPACK 3.2.1 on windows with visual studio 2010.

There are several options to build CLAPACK. At the following website, you can check and download most suitable file for your system.
Download the file clapack-3.2.1-CMAKE.tgz and expand it. Say the home directory DIR_CLAPACK_SRC = C:\…\clapack-3.2.1-CMAKE .

README.install file says that


  1. Untar clapack.tar and modify the file   (see step 1 below)
  2. Make the f2c libraries                           (see step 2 below)
  3. Make the BLAS library                            (see step 2 below)
  4. Make the main library, test it, and time it by simply typing

With visual studio 2010, the above procedure can be done with 3 steps

  1. Expand the clapack.tgz
  2. Generate CLAPACK.sln file by using cmake
  3. Compile everything with CLAPACK.sln (this step contains compilation of f2c and BLAS)

Setup of CMake is
Where is the source code: DIR_CLAPACK_SRC
Where to build the binaries: DIR_CLAPACK_DST (ex. C:/CLAPACK)
Press the “Configure” button. If the middle window shows, press the button again. Then, press “Generate” button to generate selected build files. If CMake part is successfully finished, output is saved in DIR_CLAPACK_DST.

Open CLAPACK.sln in DIR_CLAPACK_DST with Visual Studio 2010 and build it Build->Batch Build. If the build is successfully finished, the following files are generated in each directories.
lapack.lib: DIR_CLAPACK_DST/SRC/Release
tmglib.lib: DIR_CLAPACK_DST/Testing/MATGEN/Release
libf2c: DIR_CLAPACK_DST/F2CLIBS/libf2c/Release
blas.lib: DIR_CLAPACK_DST/BLAS/SRC/Release
Addition to the lib files, header files are necessary for using levmar.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s