Dear rooters,
I am compiling this simple code with
g++ under Solaris 2.7 but am getting
a lot of `undefined reference to', such as TTree, TROOT
etc, when linking.
can anyone tell me what I am missing?
Or can anyone email me a working makefile?
Thanks,
hp
------ test program t.C ---------------
#include <stdlib.h>
#include <iostream>
#include <TROOT.h>
#include <TFile.h>
#include <TTree.h>
TROOT root("test", "Test compiling");
int main(void)
{
TTree *tree = new TTree("T", "table");
return 0;
}
-------------
TO compile:
g++ -c t.C -fPIC -Wall -g -I$(ROOTSYS)/include
TO link:
g++ -g -o t t.o -L(pathname) -lNew -lCore (and others) -L(otherpath) -lm
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:27 MET