Root6 linking problems

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:, test.hh, and

#include "test.hh"
void macro(){
test *mytest=new test();

class test{
#include "test.hh"
using namespace std;
cout<<“print something”<<endl;

I compile with the command .x
Then I get this error:
/home/helga/InstallRoot/installDir/bin/root.exe: symbol lookup error: /home/helga//GuiTests/testing/ undefined symbol: _ZN4testC1Ev

echo $LD_LIBRARY_PATH gives:

echo $PATH gives:

Try first “.L” and then “.x”

Thanks for the fast answer. I did as you said and I still have the same problem. I had to change the function macro() function to returning an int instead of being void, I don’t know why…

What is the right way of including a macro into another one now with Root6. Do I do it the wrong way? (most probable since it does not work…)

“test.hh”: #if !defined(__TEST_HH__) #define __TEST_HH__ class test { public: test(); }; #endif /* !defined(__TEST_HH__) */

Thanks a lot, it looked like header guards was the problem:)
How can I do the compiling of the test macro in the script?

Try to” instead of #include “test.hh” in the script.