Re: root with eclipse

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Thu, 17 Mar 2011 15:51:07 -0500


> Should I need to add any extra .lib files?

yes, you should add at least the result of

root-config --libs

Cheers,
Philippe

On 3/17/11 10:46 AM, yczhang_at_ihep.ac.cn wrote:
> Hi, rooters
> I have downloaded root v5.27/06 for windows and installed it
> Now I want to use eclipse to do something with root.
> In eclipse ¡°Project->Properties->C/C++ Build->Settings->GCC C++ Compiler->Includes¡±£¬I set
> ¡°C:\root\include¡±, and in ¡°Project->Properties->C/C++ Build->Settings->MinGW C++ Linker->Labraries¡±,I set "C:\root\lib", for I installed root in my C: disk.
> But when I compiling a simple program as:
>
> #include "../Object.h"
> #include<iostream>
>
> #include "TFile.h"
> #include "TTree.h"
> #include "TChain.h"
>
> class SimG4Cnv : public Object
> {
> public:
> SimG4Cnv();
> virtual ~SimG4Cnv();
>
> virtual const char* getClassName();
> virtual SimG4Cnv* getInstance();
> virtual SimG4Cnv* clone();
> virtual SimG4Cnv* getThis();
>
> virtual void print();
> };
>
> #endif /* SIMG4CNV_H_ */
>
> There is one error£ºC:/root/include/TVersionCheck.h:34: undefined reference to `TVersionCheck::TVersionCheck(int)'
>
> I don¡¯t konw why there is such an error. I think that the eclipse has recognized the TFile.h, TTree.h and TChain.h. Should I need to add any extra .lib files?
>
> --
> Best regards,
> ZhangYiChun
> Institute of High Energy Physics
> Yuquan street 19£¬ Shijingshan district, Beijing, China
> EMail: yczhang_at_ihep.ac.cn
>
Received on Thu Mar 17 2011 - 21:51:13 CET

This archive was generated by hypermail 2.2.0 : Fri Mar 18 2011 - 11:50:01 CET