ld: library not found for -lgsl

后端 未结 3 1307
一整个雨季
一整个雨季 2020-12-15 20:15

I\'m working in OSX and I\'m attempting to run a make file and when I try I get the following:

ld: library not found for -lgsl
clang: error: linker command f         


        
相关标签:
3条回答
  • 2020-12-15 20:26

    I just wanted to say that I had the exact problem on OSX. Rather than setting an environment variable, I used an additional compiler flag -L/opt/local/lib, which then lets one use -lgsl. I reference this answer.

    0 讨论(0)
  • 2020-12-15 20:46

    I got the same issue and here is how I fixed it:

    export LIBRARY_PATH=/usr/local/Cellar/gsl/1.16/lib/
    

    I had previously installed gsl using:

    brew install gsl
    
    0 讨论(0)
  • 2020-12-15 20:47

    You need to add the path for where the macports installed the gsl library to your LD_LIBRARY_PATH environment variable (or most likely into the build script environment). I believe macports stores things in /opt/local/lib

    0 讨论(0)
提交回复
热议问题