# Error building C program, library complication

**URL:** <https://community.unix.com/t/error-building-c-program-library-complication/302606>\
**Category:** UNIX for Dummies Questions & Answers\
**Created:** [January 11, 2012, 11:05pm UTC](https://community.unix.com/t/error-building-c-program-library-complication/302606 "2012-01-11T23:05:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bateman1001](https://community.unix.com/letter_avatar/bateman1001/32/5_5575768a8748004e209b776fc1b2916d.png) [@Bateman1001](https://community.unix.com/u/Bateman1001)\
**Post date:** [January 11, 2012, 11:05pm UTC](https://community.unix.com/t/error-building-c-program-library-complication/302606/1 "2012-01-11T23:05:51Z")

</div>

Hi  
I'm relatively new to the unix environment, I'm about the install the root package from cern ROOT since I need this for a secondary program for DNA sequencing analysis. I however get into some trouble while I do this.  
I download the root file and ./configured it according the the macOSx64 architecture. I defined a shell varible according to instructions named $ROOTSYS which I added to my Path setenv PATH $PATH":$ROOTSYS/bin.

After this I tried to build the DNA-analysis package, with the make command.  
I Got an error message that several libraries could not be located, actually all the libraries specified within the root file.

I figured out that I forgot to run an additional script of root package,specifying all the libraries within root/lib file( source ~/root/bin/thisroot.csh

Finally I tried to build the CNVnator package again, most of the packages worked this time except one, and I got this error message

"  
++ -pthread -m64 -o cnvnator obj/cnvnator.o obj/HisMaker.o obj/AliParser.o obj/Genotyper.o obj/Genome.o samtools/libbam.a -L/Users/ericcson/Genomic\_software/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -lfreetype  
ld: library not found for -lfreetype  
collect2: ld returned 1 exit status  
make: \*\*\* [cnvnator] Error 1  
"  
It appears as of the shared library freetype package is not found, (when I made the ./configure - is said that this package already existed.

For somer eason it appears that I cannot acess this shared library, I have googles and tried to figure it out but I'm sort of stuck. Would appreciate help since I just started learning UNIX.
