Re: [Lapackpp-devel] undefined reference problem
Status: Beta
Brought to you by:
cstim
From: Andrew O. <end...@gm...> - 2006-05-23 20:18:41
|
Hey I added -lblas -lg2c and -llapack to the linker flags and my errors have been reduced to this: /usr/local/apps/intel/compiler8/lib/libimf.so.6: warning: log2l is not implemented and will always fail /usr/local/apps/intel/compiler8/lib/libimf.so.6: warning: exp2l is not implemented and will always fail /usr/lib/liblapack.so: undefined reference to `f_cpstr' /usr/lib/libblas.so: undefined reference to `f_iob' /usr/lib/liblapack.so: undefined reference to `f_cpystr' /usr/lib/liblapack.so: undefined reference to `f_concat' /usr/lib/libblas.so: undefined reference to `f_stop' Is there anyway I can find out which linker flags I need to add so that the undefined references go away? I'm really sorry but I don't know how to use automake, autoconfig or libtool... I guess I should start reading up on tutorials =[. This is specs for machine I am trying to build on http://www.sdsc.edu/user_services/ia64/tech-summary.html Andy On 5/23/06, Christian Stimming <sti...@tu...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Your commands look fine, but they will work only in the simple case. You > specify "-llapackpp" on the gcc line so that your test.cc links against > liblapackpp.so. Obviously liblapackpp.so needs to link against more > libraries, which is why liblapack.so (without the pp) is linked in. This > one in turn needs to link against yet more libraries - on my system it > requires -lblas and -lg2c; maybe you should add these arguments to gcc > as well. > > I don't specify the gcc line directly in my programs; instead, I let > libtool/automake generate that for me, and this will usually find the > appropriate linker flags automatically from the lib*.la files. In your > case the problem only is that some linker flags are missing but which > are required for your liblapack.so library. > > BTW for future bugreports please remember to specify your compiler > version number and your OS (linux? bsd? amd64?). > > Christian > > Andrew Oh schrieb: > > Hey > > > > > > I tried compiling a simple "hello world" program and I get these errors: > > > > > > tg-login1 /users/aoh> g++ test.cc -I/usr/local/apps/mpich-gm/include > > -L/usr/local/apps/mpich-gm/lib -lmpich > > -I/usr/local/apps/lapackpp-2.4.8/include/lapackpp > > -L/usr/local/apps/lapackpp-2.4.8/lib -llapackpp > > -I/users/aoh/random/include > > > > In file included from /usr/include/g++/backward/iostream.h:31, > > from test.cc:7: > > /usr/include/g++/backward/backward_warning.h:32:2: warning: #warning > > This file includes at least one deprecated or antiquated header. > > Please consider using one of the 32 headers found in section 17.4.1.2 > > of the C++ standard. Examples include substituting the <X> header for > > the <X.h> header for C++ includes, or <sstream> instead of the > > deprecated header <strstream.h>. To disable this warning use > > -Wno-deprecated. > > /usr/local/apps/intel/compiler8/lib/libimf.so.6: warning: log2l is not > > implemented and will always fail > > /usr/local/apps/intel/compiler8/lib/libimf.so.6: warning: exp2l is not > > implemented and will always fail > > /usr/local/apps/intel/compiler8/lib/libcxa.so.6: undefined reference > > to `__ashldi3' > > /usr/lib/liblapack.so.3: undefined reference to `z_abs' > > /usr/lib/liblapack.so.3: undefined reference to `c_sqrt' > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.2.1 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iQCVAwUBRHLDW2XAi+BfhivFAQLRhgQAt9hcEG7eT8bTtiJy/RscjmPlf4suQ52n > NAkaUD6aE5x/PruIPx6hzPl1Tq4tu7mQNUeZDqGiJmWbp+xly1AuOQhlmxJvwyKy > 06vU5dlPdNEA0nUfIE5EhvnQDwnz4B2Mm/TNVdBpE9Wcm6aGrm5OuwtqEhEr7GJq > Jgja/OoVlYg= > =e7P6 > -----END PGP SIGNATURE----- > |