class TVirtualX * gVritalX unresoved reference using make
I have installed root_v3.10.02.win32gdk.tar on WinXP. I use
The global variable gVirtualX is not defined when I try to build my
I could reproduce the error by using guitest.C:
Starting cygwin and root, then “.x guitest.C”
(from directory tutorial) everything looks fine.
Compiling guitest (with #define STANDALONE) using make the linker could not
Where is gVirtualX defined? Do I have to define it myself?
Using gVirtualX in my program I get illegal redefinition because gVirtualX
it is in a #define statement in TVirtualX.
Did you install ROOT under CYGWIN ?
Can you run the basic ROOT tutorials ?
gVirtualX is defined in TVirtualX.h
#define gVirtualX (TVirtualX::Instance())
one of the ways to create standalone executable
based on guitest.C under windows is the following:
cut and paste STANDALONE part from guitest.C
into the new file guitest.cxx
extern void guitest();
int main(int argc, char **argv)
TApplication theApp(“App”, &argc, argv);
- compile this program adding guitest_C.lib to the list of libraries.
VC7 project file is in attachment
guitest.zip (129 KB)