I want to use Eve in my C++ project. In the Eve tutorial there is an example, geom_alice_tpc.C, which works if interpreted in Root. However, if I embed it in my C++ program, it segfaults.
Is it possible to use Eve in the C++ code? If so, what is the correct way to do it?
An example, using the code from geom_alice_tpc.C, that segfaults:
#include “TEveManager.h”
#include “TEveGeoNode.h”
int main(){
TEveManager::Create();
gGeoManager = gEve->GetGeometry(“http://root.cern.ch/files/alice.root”);
TGeoNode* node = gGeoManager->GetTopVolume()->FindNode(“TPC_M_1”);
TEveGeoTopNode* tpc = new TEveGeoTopNode(gGeoManager, node);
gEve->AddGlobalElement(tpc);
gEve->Redraw3D(kTRUE);
return 0;
}