Re: [Lapackpp-devel] Help me: syntax errors from "COMPLEX" in Lapack++
Status: Beta
Brought to you by:
cstim
From: mohamad c. <moh...@in...> - 2004-12-15 16:19:00
|
Thank you Christian, I follow your advices and i began reading some tutorials about "automake=20 and autoconf". It will be very helpful for me if you can send me an=20 example of a configure.ac file and a Makefale.am which use the lapack++=20 library. Thank you again and again... Christian Stimming a =E9crit : > mohamad chaitou schrieb: > >> The compile command i have used is very simple (maybe stupid) because=20 >> i don't know how to deal with dependencies between these files! >> here its: > > > C++ doesn't work this way, or in other words not that simple. You need=20 > to get a textbook about how to use a C++ compiler, especially how to > 1. specify the directories to find the header files, > 2. specify the libraries to link against, and > 3. specify the directories where to find the libraries to link against. > > This is not a lapack++ problem but a general problem of how to write a=20 > C++ program that uses other libraries. > >> g++ -Wall -c tEigSolve.cc > > > In this case you are missing the specification of where to find=20 > lapackpp's header files, which would usually look like this > > g++ -I/usr/include/lapackpp -c tEigSolve.cc > > Apart from this problem, this step obviously worked. This step is=20 > called "compiling" and if you report a bug, it is important to note=20 > the the "compiling" went ok. > >> g++ tEigSolve.o > > > This other step obviously gave you errors. This step is called=20 > "linking", so you got "linker errors". The point is that your c++=20 > program uses extra libraries (lapack++'s libraries in this case), and=20 > you must tell the linker which libraries to use and where to find it.=20 > For example > > g++ -L/usr/lib -llamatrix++ -llapack++ -lblas++ -llapack -lblas=20 > tEigSolve.o > > However, usually you don't call the compiler by hand. Instead, you use=20 > some Makefile which contains the compiler commands (see "info make" on=20 > your system). And even further, you don't even write the Makefile by=20 > hand, but you have them generated by automake and autoconf (see "info=20 > automake" and "info autoconf"). In that case, autoconf is configured=20 > by a top-level file called "configure.in" or "configure.ac", and=20 > configuration for Lapack++ use can be done through the macro=20 > ACX_LAPACKPP which is included in the filename acx_lapackpp.m4. That's=20 > how we are using this in our package simthetic-mimolib=20 > http://cvs.sourceforge.net/viewcvs.py/simthetic/mimolib/ > > Christian > > > |