Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The program can't compile (make doesn't found a library) [SOLVED] #1

Open
jjram20 opened this issue Jul 9, 2017 · 5 comments
Open

Comments

@jjram20
Copy link

jjram20 commented Jul 9, 2017

I modified the code of myprogram2.cpp for locating the file NeroNTuples.root and after I used the command make but it shows the next error

g++ -g -Wall -fPIC -Wno-deprecated -ggdb -pthread -m64 -I/usr/include/root -Iaux -c -o myprogram2.o myprogram2.cpp myprogram2.cpp:13:19: fatal error: TROOT.h: No existe el fichero o el directorio #include <TROOT.h> ^ compilation terminated. <builtin>: recipe for target 'myprogram2.o' failed make: *** [myprogram2.o] Error 1

I have the file TROOT.h and all the libraries in /etc/root/include.
To use the command root I had to edit the file .bashrc adding the next line
export PATH=$PATH:/etc/root/bin
How can I link the libraries of root with the command make?

@Frigorifico9
Copy link
Owner

Frigorifico9 commented Jul 9, 2017 via email

@jjram20
Copy link
Author

jjram20 commented Jul 10, 2017

I use Debian 8.8
I'm not sure about what you refer with to check that the make files and the compilers could not be in the right directories.
The directory of the libraries is in /etc/root/include, the data is in ~/Documentos/Ver/Ntuples/NeroNtuples_9.root and the file myprogram2.cpp was modified with the new location of the data file.

@jjram20
Copy link
Author

jjram20 commented Jul 10, 2017

The solution was to change export PATH=$PATH:/etc/root/bin in .bashrc for the next lines:
export ROOTSYS=/etc/root
export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$ROOTSYS/lib:$DYLD_LIBRARY_PATH
export PATH=$ROOTSYS/bin:$PATH

@jjram20 jjram20 changed the title The program can't compile (make doesn't found a library) The program can't compile (make doesn't found a library) [SOLVED] Jul 10, 2017
@Frigorifico9
Copy link
Owner

Frigorifico9 commented Jul 11, 2017 via email

@jjram20
Copy link
Author

jjram20 commented Jul 12, 2017

I am working with Isabel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants