#include void matrixmultiply(double **a, double **b, double **c, int m, int n, int r) { void *dlhandle, *fptr; dlhandle = dlopen("libmxm.dl", RTLD_LAZY); if(dlhandle == NULL) { fprintf(_stderr, "Error: %s(): dlopen(): %s\n", __func__, dlerror()); } fptr = dlsym(dlhandle, "matrixmultiply_chdl"); if(fptr == NULL) { printf("Error: %s(): dlsym(): %s\n", __func__, dlerror()); } dlrunfun(fptr, NULL, matrixmultiply, a, b, c, m, n, r); if(dlclose(dlhandle)!=0) { fprintf(_stderr, "Error: %s(): dlclose(): %s\n", __func__, dlerror()); } }