The Library Overseer Mac OS
The Library Overseer Mac Os X
This morning I installed, compiled, and ran a simple example program using the GNU Scientific Library. This took me a while to figure out, so I’ll share the process here. I am assuming that the reader, like the author, has only vague familiarity with C.
CrossOver Mac makes it easy to launch Watchtower Library natively from the dock, and integrates macOS functionality like cross-platform copy & paste. It requires you to purchase it as it is not free, but you can download a free 14-day trial first to make sure it works for you before purchasing it.
- Install Homebrew, their site has a line of code you can run from the command line.
- Install Xcode from the Apple Applications menu.
- Install GSL, the GNU Scientific Library, using Homebrew. This will install GSL at
/usr/local/include
.
- Type /Library and then press the Go button. Method 2: In Finder (the desktop screen), click on the Go menu, then press the Option or Alt key on the keyboard. The Library entry will appear on the Go menu. Click on the Library entry. Permanently display the Library folder. Go to Applications Utilities Terminal. A Terminal window appears.
- With the release of Mac OS X Lion way back in 2011, Apple removed easy access to the user’s Library folder. Although arguably well-intentioned, this change was frustrating for longtime Mac power.
- Hammer out a sample program on your favorite editor (Vim) and name it
main.c
or something.
- Compile the code. This should produce an object file in your working directory called
main.o
.
- Link the object file to produce an executable,
a.out
. Here, the-L
flag provides the path to the library, and the-l
flag provides the name of the library that you’d like to link.
The Library Overseer Mac Os Sierra
- Run the executable
a.out
from the command line.
This should produce the following output: