[Lapackpp-devel] Re: Lapack++ v2.3
Status: Beta
Brought to you by:
cstim
From: Christian S. <sti...@tu...> - 2005-09-14 08:39:47
|
Dear Kevin, (discussion of lapack++ should be done on the mailing list lapackpp-devel, never only with individual developers! Thanks.) K. Channon schrieb: > I am trying to use the Lapack++ library in a program that I am making. > I am using Suse linux version 9.0, on i686. I could not find a .rpm > package for suse on i686, so I have installed the i586 versions of > lapack++, lapack & blas. Installation resulted in the files liblapack > liblapackpp and libblas (with a number of extensions, including .a & .so > ) being inserted into the directory /usr/lib, which I believe is > correct. Sounds quite correct. You should say where you got your "i586 versions" from (URL or similar) and whether that was rpm or .tar.gz or whatever, otherwise I cannot tell whether these are correctly built or might be problematic. More detail, please. > I have written a small test program which is as follows > > 0 #include<stdio.h> > 1 #include<.h> <.h> ?!? Sounds wrong. > 2 3 int main() > 4 { > 5 printf("\nHello!\n"); > 6 7 LaGenMatDouble A(2,2); > 8 > 9 return 0; > 10 } > > I can compile this program with lines 1 & 7 commented out using the > compile statement > > g++ test.cc -o test.out > > If only line 7 is commented out then I can compile the program with > > g++ test.cc -I/usr/include/lapackpp -o test.out Of course you need to add that include directory. That is the normal case with any larger library. > now, when I try compiling the program with no lines commented out, using > the compile statement > > g++ test.cc -I/usr/include/lapackpp -o test.out -L/usr/lib -llapackpp > -llapack -lblas > > I get an error saying: > > /usr/lib/liblapackpp.so: undefined reference to `d_sign' > /usr/lib/liblapack.so: undefined reference to `e_wsfe' That depends on the package built, and that is also a requirement of LAPACK and not of Lapack++. In principle that should be explained by documentation of LAPACK, not by me or the documentation of Lapack++, or put the other way: You have to blame LAPACK, not me. However, in the rpm packages I provide you usually have to add "-lm -lgcc_s" after the "-lblas". When building an application based on lapack++ I usually use autoconf/automake anyway, and lapack++ provides an autoconf macro in the file acx_lapackpp.m4 that can directly be used in that build system. The necessary linker flags will be determined by that autoconf macro. That's why the documentation doesn't describe this in more detail. Christian |