[ROOT] Gui Help

From: Henrique de M. J. Barbosa - mestrado (hbarbosa@ifi.unicamp.br)
Date: Thu Jan 10 2002 - 22:36:18 MET


Hi Rooters,

It's probably something very stupid but I don't know what else to try.
I'm having some problems using root GUI widgets. As it is something
completely new to me, I tried first the exemples:

	http://root.cern.ch/root/HowtoGUI.html

But I couldn't even compile correctly any of the exemples. For instance,
I've found at:

	http://root.cern.ch/root/hepvis98/newgui.html

the GUI Example number 1:

	#include <TROOT.h>
	#include <TApplication.h>
	#include <TGClient.h>

	extern void InitGui();
	VoidFuncPtr_t initfuncs[] = { InitGui, 0 };

	TROOT root("GUI", "GUI test environement", initfuncs);

	int main(int argc, char **argv)
	{
	    TApplication theApp("App", &argc, argv);
	    MyMainFrame mainWin(gClient->GetRoot(), 200, 220);
	    theApp.Run();
	    return 0;
	}


And I tried:

	gcc gui1.c -I$ROOTSYS/include -L$ROOTSYS/lib

The error message that follows is giant... something like 200 lines or
more. Am I doing something wrong??

Once I was not sure about the compilation command, I decided to try
the periodic table exemple. Since there is a Makefile, it should work
nice but it didn't. The error message is below.

Do you have any clues of what Am I doing wrong?

best regards,

Henrique Barbosa
****************************************
Henrique Barbosa      The Pierre Auger
PhD Student             Observatory

State University at Campinas - BRASIL
"Gleb Wathagin" Physics Institute
Department of Cosmic Rays and Chronology
****************************************


Oh, I'm using root v3.02.06 on linux RedHat 7.1 with gcc2.96.


========================================================
ERROR MESSAGE
========================================================
[hbarbosa@positron periodic]$ make all
Generating dictionary EventCint...
Warning: File "XSPeriodicTable.h" already loaded
Warning: File "XSStepButton.h" already loaded
Warning: File "NdbMF.h" already loaded
Warning: File "NdbMT.h" already loaded
Warning: File "NdbMTReactionXS.h" already loaded
Warning: File "NdbMaterial.h" already loaded
Warning: File "NdbParticle.h" already loaded
Warning: File "NdbParticleList.h" already loaded
g++ -g -Wall -fPIC -D_REENTRANT
-I/home/drc01/hbarbosa/wpc8/bin/croot/include -I./ -c XSGui.cxx -o XSGui.o
XSGui.cxx: In method `Bool_t XSGui::ProcessMenuMessage (long int)':
XSGui.cxx:166: cannot convert `char **' to `const char **' in
assignment
XSGui.cxx:171: jump to case label
XSGui.cxx:165:   crosses initialization of `TGFileInfo fi'
XSGui.cxx:175: jump to case label
XSGui.cxx:165:   crosses initialization of `TGFileInfo fi'
XSGui.cxx:180: jump to case label
XSGui.cxx:165:   crosses initialization of `TGFileInfo fi'
XSGui.cxx:184: jump to case label
XSGui.cxx:165:   crosses initialization of `TGFileInfo fi'
XSGui.cxx:192: jump to case label
XSGui.cxx:165:   crosses initialization of `TGFileInfo fi'
XSGui.cxx:171: case label `M_FILE_SAVE' within scope of cleanup or
variable array
XSGui.cxx:175: case label `M_FILE_EXIT' within scope of cleanup or
variable array
XSGui.cxx:180: case label `M_ELEM_REACTION' within scope of cleanup or
variable array
XSGui.cxx:184: case label `M_HELP_ABOUT' within scope of cleanup or
variable array
XSGui.cxx:192: `default' label within scope of cleanup or variable
array
make: ** [XSGui.o] Erro 1



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:37 MET