The following struggle (I am using root 6.04.14):
I have directories along with my macro in my folder:
[ul]
./src
./effic
./rootmacro.c
[/ul]
I am trying to access the function effic2 that is defined in effic/effic2.hpp and implemented in src/effic2.cpp. My root macro looks very naive:
I tried the first solution because it seemed to be faster, unfortunately I get the error
IncrementalExecutor::executeFunction: symbol '_Z19normalized_beta_incddd' unresolved while linking [cling interface function]!
You are probably missing the definition of normalized_beta_inc(double, double, double)
Maybe you need to load the corresponding shared library?
IncrementalExecutor::executeFunction: symbol '_Z5brentdddPFddEdPd' unresolved while linking [cling interface function]!
You are probably missing the definition of brent(double, double, double, double (*)(double), double, double*)
Maybe you need to load the corresponding shared library?
IncrementalExecutor::executeFunction: symbol 'gsl_set_error_handler' unresolved while linking [cling interface function]!
IncrementalExecutor::executeFunction: symbol 'gsl_set_error_handler_off' unresolved while linking [cling interface function]!
Regarding the second solution: I have the directories effic and src. How do I make a shared library out of them?
this error is due probably to the fact that other headers are pulled in by this latter file. The cause is exactly the same as before.
To compile a library, you use a compiler, such as gcc and clang. To obtain a shared library you can do:
Thanks a lot for your help. I still have issues. My shred library is using the GNU Scientific Library, which I have under
[ul]./gsl[/ul]
I tried to compile with
Then I used
#include "effic/effic2.hpp"
...
R__LOAD_LIBRARY(effic/lib/libEffic.so);
instead of gSystem->Load, and when I run my macro it says
However, gsl_set_error_handler_off is function provided by gsl. The include in src/effic2.cpp is
And this file is in
[ul]./gsl/gsl/gsl_errno.h[/ul]
But it doesn’t find it… Do you know what might be wrong?
Hi there. Are there extra precautions we need to take when compiling said macro? I’m getting undefined reference to a function I defined and loaded this way.