Re: [ROOT] compile with g++ under Solaris 2.7

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Jun 16 2000 - 11:28:49 MEST


Please ALLWAYS specify which version of Root you are using.
It is my guess that you use the binary version compiled with Solaris CC4
with your program compiled with gcc.
This cannot work (due to different name mangling scheme).

Rene Brun

HP Wei wrote:
> 
> 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