Hi,
I’m trying to run Armadillo (arma.sourceforge.net) in root/cling. The following code:
#include <armadillo>
#include <iostream>
using namespace std;
using namespace arma;
int main() {
mat A = mat(2,4);
cout << A << endl;
A.ones();
cout << A << endl;
A.randu();
cout << A << endl;
return 0;
}
runs as expected when compiled as:
g++ test.cpp -larmadillo
when in cling/root I’m having issues however as it can’t seem to find symbols that are in libarmadillo.so (checked using nm). The following:
.L /usr/lib/libarmadillo.so
#include <armadillo>
#include <iostream>
using namespace std;
using namespace arma;
mat A = mat(2,4);
cout << A << endl;
A.ones();
cout << A << endl;
A.randu();
cout << A << endl;
run interactively in the root/cling shell gives a missing symbol error for A.randu(). This method has to call into the runtime for the RNG code. It works fine up to that point. My guess is that the rest are defined in armadillo’s header files. I’m very new to using root/cling so any help would be much appreciated. I also tried using:
gSystem->Load("/usr/lib/libarmadillo.so")
but get the same results.
Many thanks,
Jason