root with eclipse

From: <yczhang_at_ihep.ac.cn>
Date: Thu, 17 Mar 2011 23:46:45 +0800


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 - 16:46:56 CET

This archive was generated by hypermail 2.2.0 : Thu Mar 17 2011 - 23:50:02 CET