Boost logo

Boost Users :

From: Javier Gonzalez (javierggt_at_[hidden])
Date: 2007-10-06 10:10:35


hi e.,

boost bindings uses a library, with the includes is
not enough, so you have to add the library to the
target.

Javier

--- e r <erwann.rogard_at_[hidden]> wrote:

> i,
>
> i looked at previous posts on this topic. did not
> help, a suggestion
> would be appreciated:
>
> installed atlas version 3.6.0-20.6
>
> /usr/lib/atlas3-test runs just fine.
>
> header cblas.h and clapack.h are in /usr/include/
> which is by default in
> my include path.
>
> Configuration:
> -I/usr/local/include/boost_1_34_1
> -I/usr/local/include/boost-bindings
> -L/usr/lib/atlas
> -llapack
> -lblas
>
> i'm trying to run the program:
>
> #include <boost/numeric/bindings/atlas/clapack.hpp>
> #include
> <boost/numeric/bindings/traits/ublas_matrix.hpp>
> #include
> <boost/numeric/bindings/traits/std_vector.hpp>
> // #include <atlas/cblas.h>
>
> namespace ublas = boost::numeric::ublas;
> namespace atlas = boost::numeric::bindings::atlas;
>
> int main() {
> std::size_t n = 5;
> ublas::matrix<double> a(n, n);
> // fill matrix a
>
> std::vector<int> ipiv (n); // pivot vector
> atlas::lu_factor (a, ipiv); // alias for
> getrf()
> atlas::lu_invert (a, ipiv); // alias for
> getri()
>
> return 0;
> };
>
> i get the error
>
> Building target: testing_numeric_bindings
> Invoking: GCC C++ Linker
> g++ -L/usr/lib/atlas -o"testing_numeric_bindings"
> ./main.o -llapack
> -lblas
> ./main.o: In function
>
`boost::numeric::bindings::atlas::detail::getrf(CBLAS_ORDER,
> int, int,
> double*, int, int*)':
>
/usr/local/include/boost-bindings/boost/numeric/bindings/atlas/clapack_overloads.hpp:87:
> undefined reference to `clapack_dgetrf'
> ./main.o: In function
>
`boost::numeric::bindings::atlas::detail::getri(CBLAS_ORDER,
> int,
> double*, int, int const*)':
>
/usr/local/include/boost-bindings/boost/numeric/bindings/atlas/clapack_overloads.hpp:163:
> undefined reference to `clapack_dgetri'
> collect2: ld returned 1 exit status
> make: *** [testing_numeric_bindings] Error 1
> make: Target `all' not remade because of errors.
> Build complete for project testing_numeric_bindings
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
>
http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net