Page 1 of 1

problems linking Clapack on Windows

PostPosted: Thu Apr 17, 2008 3:29 pm
by guillaume_bs
Hello

I have Lapack on windows ; i've downloaded the Lapack 3.1.1 installer on http://icl.cs.utk.edu/lapack-for-windows/ ; from the created files, I copied the .lib files (blas.lib, extra.lib, lapack.lib, matgen.lib ) in the appropriate file.
I have also downloaded the prebuilt librairies for Clapack on http://www.netlib.org/clapack/LIB_WINDO ... ndows.html
=> i have all these libs in my folder.
Now I want to compile a some cpp using the dgeev_ function (using visual studio). I have added all my libs to the "additional dependencies" in my project.
When I try to compile, I get about 130 linking errors like :

f77blaswrap.lib(fblaswr.obj) : error LNK2019: unresolved external symbol _cher2k_ referenced in function _f2c_cher2k

=> what's wrong?
As you guessed i'm completly new with the programing stuff (at least with building projects).



Thank you,

Guillaume

PostPosted: Thu Apr 17, 2008 6:47 pm
by Julie
Guillaume,
let's start by the beginning.
- on which platform do you want to work: Windows or Linux?
(Linux is easier)
- in which language do you want to code? C or Fortran? Which compiler do you have?
(Lapack is in Fortran but it is not a big problem to call it from C)
CLAPACK is mainly for machines without Fortran compiler.
- what is the purpose? just a quick code? or a big project?
- Do you need good performance (big matrices) or just just need a result?
Bon courage
Julie

PostPosted: Thu Apr 17, 2008 6:52 pm
by guillaume_bs
Bonsoir Julie

- I'm on windows
- I'm coding in C ; i have no idea if there is a fortran compiler on this machine...
- I want a quick code (for big matrices)

Thanks!

Guillaume

PostPosted: Fri Apr 18, 2008 4:27 pm
by Julie
Guillaume,
here is a little VS solution with your code.
http://icl.cs.utk.edu/~julie/CLAPACK-EXAMPLE-vs.zip
It is self contained...I included the lib for clapack
Just open it, build IT and execute.
Hope it helps to get you started
Julie

PostPosted: Mon Apr 21, 2008 11:01 am
by guillaume_bs
Hello Julie

Thanks again for your help ; however, when I tried to compile your files, I got a dozen of undefined references to " __ftol2_sse" :
clapackd.lib(dlaqr21.obj) : error LNK2001: unresolved external symbol __ftol2_sse

My Visual Studio version is 7.1 (while you used the 8.0 version to create this example ; maybe it comes from there...).

PostPosted: Mon Apr 21, 2008 1:08 pm
by Julie
Guillaume,
try to get your compiled you own CLAPACK ( you can get it from http://www.netlib.org/clapack/CLAPACK-3 ... Studio.zip)
and replace your new compiled librairies with mine.
It might be because we do not have the same machine.
Julie