Thanks for the replies. I mixed the compile commands from here <http://stackoverflow.com/questions/14884126/build-so-file-from-c-file-using-gcc-command-line> with the information on the libraries to link <https://www.gnu.org/software/gsl/manual/html_node/Linking-programs-with-the-library.html#Linking-programs-with-the-library> from the GSL site to make the following command:
gcc -Wall -g -shared -o libEx.so -lgsl -lgslcblas -lm -fPIC example.c However, when I ./libEx.so I get a segfault. So I opened it in gdb and ran it to get: (gdb) run Starting program: /home/crackauc/Public/libEx.so Program received signal SIGSEGV, Segmentation fault. 0x0000000000000001 in ?? () What does that error even mean? Since the object works and the shared library doesn't. I assume that I compiled it wrong.
