Hello,
I am trying to run the GNU Scientific Libraries on a M1 MacBook, using the Eclipse IDE. The source code is minimal:
#include <stdio.h>
#include <stdlib.h>
#include <gsl/gsl_sf_bessel.h>
int main(void) {
puts("Simple GSL Test");
double x = 5.0;
double y = gsl_sf_bessel_J0 (x);
printf ("J0(%g) = %.18e\n", x, y);
return EXIT_SUCCESS;
}
Linking runs without warnings:
17:02:47 **** Incremental Build of configuration Debug for project TestGSL **** make all Building file: ../src/TestGSL.c Invoking: GCC C Compiler gcc -I/opt/homebrew/Cellar/gsl/2.7.1/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/TestGSL.d" -MT"src/TestGSL.o" -o "src/TestGSL.o" "../src/TestGSL.c" Finished building: ../src/TestGSL.c
Building target: TestGSL Invoking: MacOS X C Linker gcc -L/opt/homebrew/lib/ -L/opt/homebrew/Cellar/gsl/2.7.1/lib -o "TestGSL" ./src/TestGSL.o -lgsl Finished building target: TestGSL
17:02:47 Build Finished. 0 errors, 0 warnings. (took 516ms)
Running gives the following error:
dyld[34729]: symbol not found in flat namespace (_cblas_caxpy)
I was unable to find the proper solution.
Does someone know how to fix it ?
Many thanks,
Luca