I just installed Root6. I get linking problems when I try to call another macro from my main program. Here is a minimal example that reproduces the error. There is three files: macro.cc, test.hh, and test.cc
macro.cpp
#include "test.hh"
void macro(){
test *mytest=new test();
}
test.hh
class test{
public:
test();
};
test.cc
include
#include "test.hh"
using namespace std;
test::test(){
cout<<“print something”<<endl;
}
I compile macro.cc with the command .x macro.cc+
Then I get this error:
/home/helga/InstallRoot/installDir/bin/root.exe: symbol lookup error: /home/helga//GuiTests/testing/macro_cc.so: undefined symbol: _ZN4testC1Ev
echo $LD_LIBRARY_PATH gives:
/home/helga/InstallRoot/installDir/:/home/helga/InstallRoot/installDir/lib:/home/helga/InstallRoot/installDir/
echo $PATH gives:
/home/helga/InstallRoot/installDir/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/helga/.local/bin:/home/helga/bin