I am trying to use GSL on a raspberrypi but I am having some trouble compiling on the raspberry pi. I am writing my code on a ubuntu machine and it is working, but when I tried running the same code on my raspberry pi zero I get this:
gcc -L/usr/local/lib -lgsl -o interface example.o -pthread -lgsl -lcblas -lm pkg-config --cflags --libs gtk+-3.0 -export-dynamic /usr/bin/ld: cannot find -lcblas collect2: error: ld returned 1 exit status make: *** [makefile:26: all] Error 1
I tried compiling the example that GSL gives on how to use the library, but I get the same error. I tried compiling and installing OpenBLAS on the raspberry but I get the same error. Can someone tell me what I am doing wrong and how I can get GSL to work? also I tried asking on the raspberrypi stack, but idk if I will gen an answer there..
this is the makefile I am using:
TARGET=interface
# compiler
CC=gcc
# debug
DEBUG=-g
# optimisation
OPT=-O0
# warnings
WARN=-Wall
PTHREAD=-pthread -lgsl -lcblas -lm
CCFLAGS=$(DEBUG) $(OPT) $(WARN) $(PTHREAD) -pipe
GTKLIB=`pkg-config --cflags --libs gtk+-3.0`
# linker
LD=gcc
LDFLAGS=$(PTHREAD) $(GTKLIB) -export-dynamic
OBJS= test.o
all: $(OBJS)
$(LD) -o $(TARGET) $(OBJS) $(LDFLAGS)
main.o: src/main.c
$(CC) -c $(CCFLAGS) test.c $(GTKLIB) -o test.o
clean:
rm -f *.o $(TARGET)