# How to call external libraries

**URL:** <https://root-forum.cern.ch/t/how-to-call-external-libraries/10845>\
**Category:** ROOT\
**Created:** [August 27, 2010, 9:20pm UTC](https://root-forum.cern.ch/t/how-to-call-external-libraries/10845 "2010-08-27T21:20:58Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![gerstein](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/g/b9e5f3/32.png) [@gerstein](https://root-forum.cern.ch/u/gerstein)\
**Post date:** [December 3, 2014, 1:53pm UTC](https://root-forum.cern.ch/t/how-to-call-external-libraries/10845/13 "2014-12-03T13:53:43Z")

</div>

[quote=“pcanal”]Hi,

Something like:`
gSystem->Load("/cern/fastjet-install/lib/libfastjet.so");
gSystem->AddIncludePath("/cern/fastjet-install/include");
.L /cern/ana/short-example.cc+`

Philippe.[/quote]

Hi,

I am doing this on Mac OS 10.8.5, root version 5.34/05. I make the fastjet, go into the fastjet-install/lib, make symbolic links i.e.

```
      fastjet-install/lib/libfastjet.so -> libfastjet.0.dylib

```

Then inside root  
root [0] .include /Users/gerstein/fastjet/fastjet-install/include  
root [1] int a = gSystem-\>Load(“fastjet-install/lib/libfastjet.so”); cout\<\<a\<\<"\n";  
0  
root [2] .L shortex.cc++  
Info in TUnixSystem::ACLiC: creating shared library /Users/gerstein/fastjet/./shortex\_cc.so  
Error: Template class JetDefinition::operator not defined /Users/gerstein/fastjet/fastjet-install/include/fastjet/ClusterSequence.hh:993:  
Warning: Error occurred during reading source files  
Warning: Error occurred during dictionary source generation  
!!!Removing /Users/gerstein/fastjet/shortex\_cc\_ACLiC\_dict.cxx /Users/gerstein/fastjet/shortex\_cc\_ACLiC\_dict.h !!!  
Error: /Users/gerstein/root/bin/rootcint: error loading headers…  
Error in : Dictionary generation failed!  
Info in : Invoking compiler to check macro’s validity  
/Users/gerstein/fastjet/./shortex.cc:35:1: warning: control reaches end of non-void function [-Wreturn-type]  
}  
^  
1 warning generated.  
Info in : The compiler has not found any problem with your macro.  
Probably your macro uses something rootcint can’t parse.  
Check [root.cern.ch/viewvc/trunk/cint/doc/limitati.txt](http://root.cern.ch/viewvc/trunk/cint/doc/limitati.txt) for Cint’s limitations.

any advice would be appreciated.

---

_[View the full topic](https://root-forum.cern.ch/t/how-to-call-external-libraries/10845)._
