linking clapack using cmake

Post here if you have problem using the CMAKE build process

linking clapack using cmake

Postby Scott54 » Thu Jan 26, 2012 6:00 pm

Hello, I am having a difficult time linking clapack to my project using cmake on linux.

I have gotten clapack-3.2.1-cmake, compiled and linked it to my project by grabbing libblas.a, liblapack.a, libf2c.a and libtmmlib.a as well as blaswrap.h, clapack.h and f2c.h and placing them in sub directories of my project.
I have also added lines in my cmakelist.txt file to include and link those files

INCLUDE_DIRECTORIES(${VMT_PRJ_SOURCE_DIR}/CLAPACK)
LINK_DIRECTORIES(${VMT_PRJ_SOURCE_DIR}/CLAPACK/lib)
LINK_LIBRARIES( blas lapack f2c tmglib )

(the libraries are in the directory (${VMT_PRJ_SOURCE_DIR}/CLAPACK/lib) and the headers are in (${VMT_PRJ_SOURCE_DIR}/CLAPACK)

This method has worked on osx but not on my linux. I believe I am linking in the correct order but have run out of good ideas. Any help here is greatly appreciated, I realize this is a problem with the way I am constructing my project but any help would be great. Thanks,

Scott

P.S.
The errors I am getting look like this

/home/siggik/Development/SFT-9012/CLAPACK/lib/liblapack.a(sbdsqr.c.o): In function `sbdsqr_':
sbdsqr.c:(.text+0xfa0): undefined reference to `srot_'
sbdsqr.c:(.text+0x101e): undefined reference to `srot_'
sbdsqr.c:(.text+0x1093): undefined reference to `srot_'
sbdsqr.c:(.text+0x3325): undefined reference to `sscal_'
sbdsqr.c:(.text+0x34f9): undefined reference to `sswap_'
sbdsqr.c:(.text+0x3572): undefined reference to `sswap_'
sbdsqr.c:(.text+0x35e2): undefined reference to `sswap_'
Scott54
 
Posts: 6
Joined: Thu Jan 26, 2012 5:08 pm

Re: linking clapack using cmake

Postby admin » Fri Jan 27, 2012 10:35 am

The BLAS library seems to be the problem,
You should check LAPACKE, the new C Standard Interface to LAPACKE
http://www.netlib.org/lapack/#_standard ... for_lapack
admin
Site Admin
 
Posts: 502
Joined: Wed Dec 08, 2004 7:07 pm


Return to CMAKE

Who is online

Users browsing this forum: No registered users and 1 guest