使用 IDE 设置 CERN ROOT

发布于 2024-09-27 12:15:45 字数 169 浏览 5 评论 0原文

我有兴趣为使用 C++ 和 ROOT 的项目设置 IDE(最好是 Eclipse 或 Netbeans)让它能够为我编译。这可能吗?

源代码可用于 ROOT,因此应该有某种方法将这些东西连接在一起......

I'm interested in setting up an IDE (preferably Eclipse or Netbeans) for a project that uses C++ and ROOT and have it be able to compile for me. Is this possible?

Source code is available for ROOT, so there should be some way of hooking these things together...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

四叶草在未来唯美盛开 2024-10-04 12:15:46

我认识的大多数 ROOT 用户都使用 emacs 或 vi。

也就是说,如果您可以指定构建,这应该是可能的。使用 root-config 命令指定路径和库。

ROOT_HEADERS_PATH=$(root-config --cflags)

等等。只需 root-config 即可为您提供可接受参数的列表。

我猜想最有可能的障碍是为您想要合并到根 TObject 树中并在 cint shell 中使用的类生成 rootcint 文件。

Most of the ROOT users I know use emacs or vi.

That said, if you can specify the build, this should be possible. Make use of root-config commands to specify the paths and libraries.

ROOT_HEADERS_PATH=$(root-config --cflags)

and so on. Just root-config will give you a list of accepted arguments.

I'd guess that the most likely stumbling block for this is the generation of the rootcint files for classes that you want to incorporate into the root TObject tree and use in the cint shell.

锦上情书 2024-10-04 12:15:46

对于那些使用 MAC 的 xcode IDE 的人,您可以查看我的答案 此处用于在 xcode v7.3 中设置 ROOT v6。它展示了如何至少开始编写在 xcode 中使用 ROOT 类的 C++ 脚本。

For those working with a MAC's xcode IDE, you can see my answer here for setting up ROOT v6 in xcode v7.3. It shows how to at least get started writing C++ scripts that use ROOT classes in xcode.

全部不再 2024-10-04 12:15:46

我现在建议使用 QtCreator IDE。它通过单击“文件”、“打开文件或项目”,然后双击 ROOT git 存储库的主 CMakeLists.txt 来解决这个问题。

更详细的说明可以在 https://root.cern/blog/code-horsepower- f1/

它还可以与任何依赖于 ROOT 库的 CMake/C++ 项目一起使用,并且集成是无缝的。

I'd recommend now to use the QtCreator IDE. It works out the box by clicking on "File", "Open File or Project" and then double-clicking on the main CMakeLists.txt of the ROOT git repository.

More detailed instructions can be found on https://root.cern/blog/code-horsepower-f1/

It can also be used with any CMake/C++ projects that depends on ROOT libraries, and the integration is seamless.

那支青花 2024-10-04 12:15:46

您可以使用 geany

在那里,您还可以自定义荧光笔以很好地格式化 ROOT 类。它存储在 $HOME/.config/geany/filedefs/filetypes.cpp 中,

在下面找到我编辑的版本的片段。

primary=alignas alignof and and_eq auto bitand bitor bool char char16_t char32_t class const constexpr decltype double enum explicit export extern false final float friend inline int int8_t int16_t int32_t int64
_t long mutable namespace noexcept not not_eq nullptr or or_eq override ptrdiff_t register short signed size_t static static_assert struct template thread_local true typedef typename union unsigned using virtual
 void volatile wchar_t xor xor_eq TH1 TH1C TH1D TH1F TH1I TH1K TH1S TH2 TH2C TH2D TH2F TH2I TH2S TH3 TH3C TH3D TH3F TH3I TH3S TF1 TF2 TF3 THStack TGraph TGraph2D TRandom TLimit TLatex TNtuple TObject TTree TIter
 TKey TRandom2 TShape TPad TMacro TString TLine TLegend TFile TRandom3 TMath TLeaf TLeafB TLeafC TLeafD TLeafElement TLeafF TLeafI TLeafL TLeafO TLeafObject TChain TDirectory TList TArc TChain TDirectory TList T
Arc TBox TEllipse TPolyLine TCurlyLine TCurlyArc TMinuit TFitter TLinearFitter TLorentzVector TLorentzRotation TVector3 TVector2 TRotation TGenPhaseSpace TFeldmanCousins TRobustEstimator TRolke TQuaternion TPost
Script TSVG TPDF TImageDump THtml TColor TStyle TComplex TPRegexp TObjArrayIter TMapIter TClass TEnv TGlobal TCint TROOT TDictionary TTime TTimer Double_t Int_t UInt_t Float_t Long_t Bool_t Byte_t char_t Marker_
t Double32_t Float16_t Long64_t Short_t Stat_t Style_t Text_t UShort_t ULong64_t Char_t UChar_t TBranch
secondary=asm break catch case continue compl const_cast dynamic_cast do default delete else for goto if new operator public private protected return reinterpret_cast sizeof static_cast switch this throw try typ
eid while NULL

You can use geany.

There, you can also customize the highlighter to format nicely ROOT classes. It is stored in $HOME/.config/geany/filedefs/filetypes.cpp

Find below a snippet of my edited version.

primary=alignas alignof and and_eq auto bitand bitor bool char char16_t char32_t class const constexpr decltype double enum explicit export extern false final float friend inline int int8_t int16_t int32_t int64
_t long mutable namespace noexcept not not_eq nullptr or or_eq override ptrdiff_t register short signed size_t static static_assert struct template thread_local true typedef typename union unsigned using virtual
 void volatile wchar_t xor xor_eq TH1 TH1C TH1D TH1F TH1I TH1K TH1S TH2 TH2C TH2D TH2F TH2I TH2S TH3 TH3C TH3D TH3F TH3I TH3S TF1 TF2 TF3 THStack TGraph TGraph2D TRandom TLimit TLatex TNtuple TObject TTree TIter
 TKey TRandom2 TShape TPad TMacro TString TLine TLegend TFile TRandom3 TMath TLeaf TLeafB TLeafC TLeafD TLeafElement TLeafF TLeafI TLeafL TLeafO TLeafObject TChain TDirectory TList TArc TChain TDirectory TList T
Arc TBox TEllipse TPolyLine TCurlyLine TCurlyArc TMinuit TFitter TLinearFitter TLorentzVector TLorentzRotation TVector3 TVector2 TRotation TGenPhaseSpace TFeldmanCousins TRobustEstimator TRolke TQuaternion TPost
Script TSVG TPDF TImageDump THtml TColor TStyle TComplex TPRegexp TObjArrayIter TMapIter TClass TEnv TGlobal TCint TROOT TDictionary TTime TTimer Double_t Int_t UInt_t Float_t Long_t Bool_t Byte_t char_t Marker_
t Double32_t Float16_t Long64_t Short_t Stat_t Style_t Text_t UShort_t ULong64_t Char_t UChar_t TBranch
secondary=asm break catch case continue compl const_cast dynamic_cast do default delete else for goto if new operator public private protected return reinterpret_cast sizeof static_cast switch this throw try typ
eid while NULL
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文