Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm installing lenstool which needs pgplot library so I got the source codes and followed this to install it I also ran one of it examples and it seemed to work. But when I try to make lenstool it returns this error:

/usr/bin/ld: cannot find -lpgplot
collect2: ld returned 1 exit status
make[1]: *** [Histogram] Error 1
make[1]: Leaving directory `/home/soroosh/soroosh/darkmatter/lenstool/lenstool_v6.7.1/utils'
make: *** [all-recursive] Error 1

ubuntu 12.04 lts 64 bit. and I have installed pgplot in:

/usr/local/src/pgplot

Is this a linking problem? Please help me with this. tell me if other specifications are needed.

share|improve this question

migrated from stackoverflow.com Dec 2 '12 at 20:18

This question came from our site for professional and enthusiast programmers.

    
"ld" the dynamic library loader couldn't locate "lpgplot" library. So when you try to make "lenstool" you are missing "lpgplot". What do you mean by you've "installed" pgpplot in "/usr/local/src"? –  happy coder Dec 2 '12 at 13:36
    
I copied the files there and ran configure and make there also once it needs a destination directory which I set on the same folder –  user1414470 Dec 2 '12 at 13:43
    
Run it like LDFLAGS=-L/your/path/to/pgplot make –  week Dec 2 '12 at 21:02
    
Thank you that fixed it –  soroosh.strife Dec 4 '12 at 12:17

1 Answer 1

It was a linking problem, because of not standard path, linker couldn't find pgplot library. Solution is to add to LDFLAGS, parameter -L, which adds path to libraries.

LDFLAGS=-L/your/path/to/pgplot make

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.