0

I'm using a framework called ROOT in my code, ROOT provides a large amount of libs, between then there is PROOF which should allow my code run in parallel.

Should be defined in TProof.h a static method Open that starts the parallel environment. I'm using this method as the following:

//usual includes (including ROOT's)
#include 
//lots of code
int main(int argc, const char *argv[])   {
    //Initialization code
    TProof *p = TProof::Open("");
    // more code
    return 0;
}

g++ gives me this error:

mini2.o: In function `main':
/path/to/file/name.cxx:279: undefined reference to `TProof::Open(char const*, char const*, char const*, int)'

ROOT provides a script that prints all the necessary flags to compile and link its libs, I'm using those flags, in this case:

$ root-config --libs
-L/my/path/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic

What I'm doing wrong? How can I solve it?

3
  • 1
    The error you're getting is a linker error, not a compiler error. TProof.h is found by the compiler (otherwise that step would fail already), but you seem to have forgotten to link against the relevant libraries. Commented Feb 4, 2013 at 22:25
  • I'm linking with all the necessary libraries, at least ROOT think so. Commented Feb 4, 2013 at 23:28
  • Either way, I edited the question, it should be a bit clearer. Commented Feb 4, 2013 at 23:32

1 Answer 1

1

You are missing at least -lProof in your compiler (linker) options. I don't really know the framework, so I can't tell you whether this is your fault or a problem with the configuration script.

(This is how I found out: Downloaded the binary distribution of ROOT, checked the lib folder and found libProof.so.)

If this is not enough, include the other Proof* libraries you can find in the library directory.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.