Hi Rooters,
I have been having a problem compiling and running programs on Mac OS 10.3.3 using root 3.10.02-14 download and compiled using fink. I suspect my problems are specific to my installation, but since I haven't done anything custom, I hope maybe you will be able to help me. I can successfully compile the following program:
#include <TCanvas.h>
#include <TApplication.h>
void main(int argc, char **argv)
{
TApplication myapp(“application”, &argc, argv);
TCanvas c1;
}
=======
Simple, right? I compile it with the following commands:
~> g++ -ggdb root-config --cflags
-I/Users/waldman/Src/include -c testint.cc
~> g++ -ggdb root-config --libs
testint.o -o testint
========
with no problem. When I run it however, I get:
~> ./testint
dyld: ./testint multiple definitions of symbol __ZN7TCanvas15SetDoubleBufferEi
/sw/lib/root/libGpad.so definition of __ZN7TCanvas15SetDoubleBufferEi
/sw/lib/root/libGpad.3.dylib(TCanvas.o) definition of __ZN7TCanvas15SetDoubleBufferEi
Trace/BPT trap
~>
=========
If I compile the code commenting out the TApplication line, it works fine, same if I comment out TCanvas. The error seems to be that TApplication links to the library .so and TCanvas.o links to the library .dylib (or something). Can anyone tell me how to fix this?
Thanks very much for your help,
sam waldman