English 中文(简体)
ROOT (cern) : gClient, 应用
原标题:ROOT (cern) : gClient, gApplication

在我的程序中使用 gClient-gt;GetRoot > () 或 gApplication-gt;\\\\\/code> 之类的文件时,我有一些问题。如果我使用 root 控制台( CINT), 问题就解决了。 但如果我想编译它, 我会得到 :

 gClient  was not declared in this scope

有人知道一个问题吗?

问题回答

gApplication 在位于$ROOTSYS/including/trapplication.h.h.中的TApplication中定义了 gApplication 。如果将该页眉文件纳入源代码中,它应该“只管工作。”对于其他变量,如 gROOOT ,gClient ,等等,类似,它们位于标题文件TROOT.h, TClient.h等。

在我本地版本(来自2011年12月12日的ROOT v5.32)中, 应用程序中的代码片断。 h 页头文件是

// definition of TApplication above
   ClassDef(TApplication,0)  //GUI application singleton
};

R__EXTERN TApplication *gApplication;

其他的看起来相似。

您必须 # 包含正确的包含文件, 根据您的设置, 链接一些库 。

如果您在 root 帮助页面中查找 root 对象,右上角的小框会告诉你需要什么。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?