jack
unread,Apr 20, 2012, 11:54:13 AM4/20/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to linbox-use
Dear Linbox-team,
I have two different compile problems:
the first one is related to a nameclash with std::rank
I'm resolving this by changing 'rank' to LinBox::rank in 'rank.h'
Even if LinBox never(?) uses std namespace this could happen in other
places
(appears at least in 'fflas-ffpack/utils/args-parser.h')
the second problem is an undefined function error:
appears when trying to compile following small example with linbox
1-2-2 :
Any suggestions?
Jakob
///////////////////////////////////////////////
#include <linbox/linbox-config.h>
#include <linbox/field/Givaro/givaro-gfq.h>
#include <linbox/blackbox/sparse.h>
#include <linbox/blackbox/matrix-blackbox.h>
#include <linbox/matrix/blas-matrix.h>
#include <linbox/solutions/rank.h>
template <class FieldType>
inline void testDeterminant()
{
FieldType gfqField(3,4);
int rows_m = 4; int cols_m = 4;
//LinBox::BlasMatrix<FieldType> mat( gfqField, rows_m, cols_m );
LinBox::SparseMatrix<FieldType, typename
Vector<FieldType>::SparseSeq > mat( gfqField, rows_m, cols_m );
for ( int currRow=0; currRow < rows_m; currRow++ )
for ( int currCol =0; currCol < cols_m; currCol++ )
{
mat.setEntry(currRow,currCol, ((int)rand()) %
gfqField.characteristic() );
}
unsigned long rnk = 0;
rnk= LinBox::rank(rnk,mat);
std::cout << " rank = " << rnk << std::endl;
}
int main(int argc, char* argv[])
{
testDeterminant<LinBox::GivaroGfq>();
return 0;
}
///////////////////////////////////////////////
/tmp/include/linbox/solutions/rank.h:61: warning: inline function
‘long unsigned int& LinBox::rank(long unsigned int&, const Blackbox&,
const DomainCategory&, const Method&) [with Blackbox =
LinBox::SparseMatrix<LinBox::GivaroGfq, std::vector<std::pair<long
unsigned int, int>, std::allocator<std::pair<long unsigned int, int> >
> >, Method = LinBox::HybridSpecifier, DomainCategory =
LinBox::RingCategories::ModularTag]’ used but never defined
/tmp/ccHuz35F.o: In function `unsigned long&
LinBox::rank<LinBox::SparseMatrix<LinBox::GivaroGfq,
std::vector<std::pair<unsigned long, int>,
std::allocator<std::pair<unsigned long, int> > > > >(unsigned long&,
LinBox::SparseMatrix<LinBox::GivaroGfq, std::vector<std::pair<unsigned
long, int>, std::allocator<std::pair<unsigned long, int> > > >
const&)':
gfqTest.cpp:
(.text._ZN6LinBox4rankINS_12SparseMatrixINS_9GivaroGfqESt6vectorISt4pairImiESaIS5_EEEEEERmS9_RKT_[unsigned
long& LinBox::rank<LinBox::SparseMatrix<LinBox::GivaroGfq,
std::vector<std::pair<unsigned long, int>,
std::allocator<std::pair<unsigned long, int> > > > >(unsigned long&,
LinBox::SparseMatrix<LinBox::GivaroGfq, std::vector<std::pair<unsigned
long, int>, std::allocator<std::pair<unsigned long, int> > > > const&)]
+0x48): undefined reference to `unsigned long&
LinBox::rank<LinBox::SparseMatrix<LinBox::GivaroGfq,
std::vector<std::pair<unsigned long, int>,
std::allocator<std::pair<unsigned long, int> > > >,
LinBox::HybridSpecifier, LinBox::RingCategories::ModularTag>(unsigned
long&, LinBox::SparseMatrix<LinBox::GivaroGfq,
std::vector<std::pair<unsigned long, int>,
std::allocator<std::pair<unsigned long, int> > > > const&,
LinBox::RingCategories::ModularTag const&, LinBox::HybridSpecifier
const&)'