Re: [linbox-use] Difficulty getting tutorial to compile

62 views
Skip to first unread message

B Saunders

unread,
Nov 15, 2012, 9:40:24 PM11/15/12
to linbo...@googlegroups.com
Hi Doug,

The tutorial is a bit out of date.  Actually in an earlier thread I said I had it fixed.  There was a glitch in that.  Perhaps this time the corrected example will stick.  Anyway, here is a version that should work.

#include <linbox/field/modular.h>
#include <linbox/matrix/blas-matrix.h>
#include <linbox/solutions/det.h>
#include <linbox/util/matrix-stream.h>

using namespace LinBox;

main()
{
    typedef Modular<double> Field;
    typedef BlasMatrix<Field> Matrix;
    Field F(65521);
    MatrixStream<Field> ms(F, std::cin);
    Matrix A(ms);
    Field::Element d;
    Method::BlasElimination M;
    det(d, A, M);
    F.write(std::cout << "the determinant is ", d) << std::endl;
}


Best,
-dave

--
Prof. B. David Saunders, 302-831-6238, CIS Department, University of Delaware


On Tue, Nov 13, 2012 at 8:50 PM, Doug Torrance <torr...@vandals.uidaho.edu> wrote:
Hello,

I am hoping that Linbox will prove useful in my research.  I successfully installed the Linbox packages on Ubuntu 12.10 and have been trying to learn how to use it.  However, I have not been able to get the program from the tutorial online to compile.  Here is the code:

#include <linbox/field/modular.h>
#include <linbox/blackbox/dense.h>
#include <linbox/solutions/det.h>

using namespace LinBox;

main()
{
    typedef Modular<double> Field;
    typedef DenseMatrix<Field> Matrix;
    Field F(65521);
    Matrix A; A.read("datafile");
    Field::Element d;
    det(d, A, blasElimination);
    F.write(cout << "the determinant is ", d) << endl;
}

However, when I try to compile it, I get a multitude of errors, which I have attached.  I am compiling using
g++ tutorial.cpp -o tutorial -llinbox

I have tried various variations with -latlas, -lgmp, etc, and pointing to the directories with -L/usr/include, etc, all to no avail.  Does anyone have any suggestions?

Thank you,
Doug Torrance

--
You received this message because you are subscribed to the Google Groups "linbox-use" group.
To view this discussion on the web visit https://groups.google.com/d/msg/linbox-use/-/N5Q2v027-4cJ.
To post to this group, send email to linbo...@googlegroups.com.
To unsubscribe from this group, send email to linbox-use+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/linbox-use?hl=en.

Robert Schabinger

unread,
Nov 22, 2012, 5:30:26 AM11/22/12
to linbo...@googlegroups.com
Hi Doug,

I had similar trouble not too long ago and I think you might be able to get something out of my recent post "unable to install latest stable release". 

Best,

Rob Schabinger
Reply all
Reply to author
Forward
0 new messages