Linking against GSL With Xcode
imported Code · ic.ac.uk
Further to the previous comment, you can also link against GSL from within an Xcode project:
- Create an Xcode “C++ Tool” project from the command line projects options.
- Within the project Ctrl+Click on the project name, and select “Get Info”
- Use the Spotlight-esque search at the top of this window to search for Compiler, and select the “Other C++ Flags” text box.
- Into the box enter
-I/opt/local/include -L/opt/local/lib -lgsl
leave the$(OTHER_CFLAGS)
existing input there.
You should then be able to use the Build command in Xcode to build the project linked against GSL. This assumes that you install GSL from MacPorts as documented previously.