g++ compilation with gsl: library not found
<p>Hi I'm trying to install and use GSL library following this guide: <a href="http://connor-johnson.com/2014/10/12/using-the-gnu-scientific-library-on-a-mac/" rel="nofollow noreferrer">Install GSL on Mac</a>. The brew installation works fine and I can see the file in path: /usr/local/include. Then I tried with the sample c code, but when I compile it gives me this error: symbol(s) not found for architecture x86_64. I searched and referred to this answer here: <a href="https://stackoverflow.com/questions/9710183/c-compile-gsl-on-x86-64">g++ error</a>, so I added -lgsl to the command, sth like:</p>

<pre><code>g++ -I/usr/local/include -lgsl main.c
</code></pre>

<p>But it gives: ld: library not found for -lgsl error. How can I resolve this? Thank you!</p>