Reputation: 13433
I am attempting to use the GSL library with Xcode, but I can't get it to link.
Efforts so far, based on hours of searching:
1. Downloaded GSL libary v2.1.
http://www.gnu.org/software/gsl/
2. Followed installation directions in README.
3. Xcode build settings:
a. "Other C++ Flags:" -I/usr/local/include
b. "Header Search Paths:" /usr/local/include/
c. "Framework Search Paths:" /library/Frameworks
d. "C/C++/Objective C compiler:" Default Compiler (Apple LVVM 7.0)
I tried to change the compiler to GCC, but the option is not there.
Somewhere I was referred to the Accelerate Mathematics framework. I would prefer to use the GNU tool. I realize that when using a Mac, I am in The World According to Apple, and must play by their rules, but I would hate to dump the GSL library for this reason. Furthermore, it seems that support for this framework seems to be minimal. https://developer.apple.com/library/mac/navigation/#section=Frameworks&topic=Accelerate
Also reference this post, which is dated, but has some relevant comments from users wrestling with this issue in previous versions of Xcode:
Xcode 4.3.3 can't find any header files
Upvotes: 2
Views: 2611
Reputation: 13433
Got it. For posterity, the solution is as follows.
Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package.
Build Settings
a. Search Paths/Header Search Paths
: /usr/local/include
b. Linking/Other Linker Flags
: -I/usr/local/include -L/usr/local/lib -lgsl -lgslcblas
Hope this helps someone out there.
Upvotes: 3