I have a code written in C++, which has functionalities related to Camera and reflector those are used in Imaginf cherenkov gamma ray telescopes. I am compiling this code using gnu compiler through makefile. I am trying to build GUI for it using ROOTv5.32 . However when I run rootcint command to generate dictionary it gives me following error.desktop:~/SIDAR_lite$ rootcint -f MaceGUIDict.cxx -c MaceGUI.h MaceGUILinkDef.h
Error: cannot open file "bits/predefs.h" /usr/include/features.h:325:
Error: cannot open file "gnu/stubs.h" /usr/include/features.h:390:
Error: Symbol __BEGIN_DECLS#include is not defined in current scope /usr/include/dirent.h:36:
Error: Symbol bits is not defined in current scope /usr/include/dirent.h:36:
Error: Symbol types is not defined in current scope /usr/include/dirent.h:36:
Error: Failed to evaluate types.h
Error: operator '/' divided by zero /usr/include/dirent.h:36:
Error: Symbol #ifdef __USE_XOPEN#ifndef __ino_t_defined#ifndef __USE_FILE_OFFSET64 typedef __ino_t ino_t is not defined in current scope /usr/include/dirent.h:36:
Error: cannot open file "bits/dirent.h" /usr/include/dirent.h:64:
Error: Symbol __const char is not defined in current scope /usr/include/dirent.h:136:
Error: Symbol __name is not defined in current scope /usr/include/dirent.h:136:
Error: Missing one of '{' expected at or after line 151.
Error: Unexpected end of file (G__fignorestream():3) /usr/include/dirent.h:406:
Error: cannot open file "MaceGUILinkDef.h" :0:
!!!Removing MaceGUIDict.cxx MaceGUIDict.h !!!
Error: rootcint: error loading headers...
So basically I want to be able to include dirent.h and all such non-standard C/C++ headers properly through makefile rootcint.How do I do it ??
Try:
rootcint -f MaceGUIDict.cxx -c -p MaceGUI.h MaceGUILinkDef.h
Thanks!!!..
The constructor in MaceGUI class creates an object of class CAMERA defined in CAMERA.cxx corresponding to CAMERA.h .
Now rootcint command with above modification runs. but now I have another problem. The CAMERA object in MaceGUI is not identified and I get following error.
[code]chinmay@chinmay-desktop:~/SIDAR_lite$ make -f myMakefile MaceGUI
rootcint -f MaceGUIDict.cxx -c -p MaceGUI.h MaceGUILinkDef.h
g++ MaceGUI.cxx CAMERA.o MaceGUIDict.cxx -pthread -m64 -I/home/chinmay/ROOTv5.32/root/include -L/home/chinmay/ROOTv5.32/root/lib -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -o MaceGUI
MaceGUI.cxx: In constructor ‘MyMainFrame::MyMainFrame(const char*, int, const TGWindow*, UInt_t, UInt_t)’:
MaceGUI.cxx:10:9: error: expected ‘;’ before ‘cam’
MaceGUI.cxx:16:13: error: ‘cam’ was not declared in this scope
MaceGUI.cxx:119:16: error: expected primary-expression before ‘const’
MaceGUI.cxx: In member function ‘void MyMainFrame::DrawImage()’:
MaceGUI.cxx:139:4: error: ‘cam’ was not declared in this scope
make: *** [MaceGUI] Error 1
[/code]
The constructor in MaceGUI class creates an object of class CAMERA defined in CAMERA.cxx corresponding to CAMERA.h .
Now rootcint command with above modification runs. but now I have another problem. The CAMERA object in MaceGUI is not identified and I get following error.
chinmay@chinmay-desktop:~/SIDAR_lite$ make -f myMakefile MaceGUI
rootcint -f MaceGUIDict.cxx -c -p MaceGUI.h MaceGUILinkDef.h
g++ MaceGUI.cxx CAMERA.o MaceGUIDict.cxx -pthread -m64 -I/home/chinmay/ROOTv5.32/root/include -L/home/chinmay/ROOTv5.32/root/lib -lGui -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -o MaceGUI
MaceGUI.cxx: In constructor ‘MyMainFrame::MyMainFrame(const char*, int, const TGWindow*, UInt_t, UInt_t)’:
MaceGUI.cxx:10:9: error: expected ‘;’ before ‘cam’
MaceGUI.cxx:16:13: error: ‘cam’ was not declared in this scope
MaceGUI.cxx:119:16: error: expected primary-expression before ‘const’
MaceGUI.cxx: In member function ‘void MyMainFrame::DrawImage()’:
MaceGUI.cxx:139:4: error: ‘cam’ was not declared in this scope
make: *** [MaceGUI] Error 1
Hi…
The linking of CAMERA.h got solved when I made a class Camera object , member of my GUI class.
Thanks for help.