ROOt Libs

Hi:
I am trying to compile garfroot.C (to use Root prompt in Garfield (simulation package)) which contains:
##########################
#include
#include
#include

#include <TROOT.h>
#include <TRint.h>

#include “Plotting.hh”

int main(int argc, char * argv[]) {

std::cout << “Welcome to Garfield++\n”;
Garfield::plottingEngine.SetDefaultStyle();

TRint* app = new TRint(“Garfield”, &argc, argv, 0, 0);

app->Run(kTRUE);

}

###########################################

using the following makefile:
##########################################
OBJDIR = $(GARFIELD_HOME)/Object
SRCDIR = $(GARFIELD_HOME)/Source
INCDIR = $(GARFIELD_HOME)/Include
HEEDDIR = $(GARFIELD_HOME)/Heed
LIBDIR = $(GARFIELD_HOME)/Library

Compiler flags

CFLAGS = -Wall -Wextra -Wno-long-long
root-config --cflags
-O3 -fno-common -c
-I$(INCDIR) -I$(HEEDDIR)

Debug flags

CFLAGS += -g

LDFLAGS = root-config --evelibs -lGeom -lRint -lgfortran -lm
LDFLAGS += -L$(LIBDIR) -Wl,–whole-archive -lGarfield -Wl,–no-whole-archive
#LDFLAGS += -all_load
LDFLAGS += -g

garfroot: garfroot.C
$(CXX) $(CFLAGS) garfroot.C
$(CXX) -o garfroot garfroot.o $(LDFLAGS)
rm garfroot.o
##############################################
I have the following error message:

/usr/bin/ld: cannot find -lEve
/usr/bin/ld: cannot find -lRGL

Are those libs related to ROOT libs or C++ libs ?

(I can not find them online or in the synaptic package manager)

Please send me the name of the libs that I have to install or a link to them if possible. (I am installing root 5.32.01 in UBUNTU 11.10) or a a clue to what to do next?

Thanks

Hi,

[quote]/usr/bin/ld: cannot find -lEve
/usr/bin/ld: cannot find -lRGL

Are those libs related to ROOT libs or C++ libs ?[/quote]Both are optional library in ROOT, they usually do not build when the opengl library are not install. I.e. (see root.cern.ch/drupal/content/build-prerequisites), you may need to install at least mesa-libGL-devel and glew-devel (and/or xlibmesa-glu-dev and libglew1.5-dev).

Cheers,
Philippe.

Thanks for your fast reply, I tried to use debian packages for the libs you suggested, but unfortunately it is working, I wonder if the library structure affects its function in some cases( a bug), I think I do not have the right to bother you about this, I may look in an open gl forum as hope to find an answer. Thanks again Philippe.

You need to “configure” and “make” your ROOT from scratch (after you installed these missing “devel” packages).
After the “configure” step, make sure that the “config.log” file contains “Result: Enabled support for … opengl, …” somewhere near its end.
After the “make” step, try to:

find ./ -name "libRGL.*"
find ./ -name "libEve.*"

You should see at least four files:
./lib/libRGL.rootmap
./lib/libRGL.so
./lib/libEve.rootmap
./lib/libEve.so

Thanks Pepe there are installed now.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.