vgvassilev / cling

The interactive C++ interpreter Cling
https://rawgit.com/vgvassilev/cling/master/www/index.html
Other
1.77k stars 102 forks source link

IncrementalExecutor::executeFunction: symbol unresolved while linking [cling interface function]! #150

Closed laseryuan closed 7 years ago

laseryuan commented 7 years ago

I knew ROOT wrapped GSL as a math module, but I'd rather use light weight Cling to load it myself. I got GSL compiled successful under default configuration. In cling, the headers can be load smoothly. But when do some variable manipulations, I got following error message: IncrementalExecutor::executeFunction: symbol 'gsl_root_fsolver_brent' unresolved while linking [cling interface function]! By searching, the error seems related with GCC version and ABI. But I also see that it should no longer be an issue with latest cling.

vgvassilev commented 7 years ago

You probably should load the library corresponding to the header files. Eg.

#include "A.h"
.L libA
laseryuan commented 7 years ago

Thanks @vgvassilev , you solved my problem again! I found the lib file "libgsl.so" in the path "/usr/local/lib". Include this path when start cling, then .L libgsl.so works like a charm