Hi,
Thanks for setting all of this up. I am seeking to use the BGL library for calculating directional connectivity index (DCI) on a binary matrix. I have successfully downloaded and unzipped the package folder, but I get an error message when I seek to compile the matlab_bgl_sp_mex.c file. I seek to compile the mex script with:
mex matlab_bgl_sp_mex.c -lmwlapack -lmwblas
And I get the error string below. It is a lot of text, but I figure maybe necessary to establish what is wrong. Apologies for any newbie misunderstanding.
Building with 'Xcode with Clang'.
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:246:13: warning: case value not in enumerated type 'mxClassID' [-Wswitch]
CHECK_AND_SET_VISITOR_FUNCTION(vis,initialize_vertex,d_vis);
^
/Volumes/easystore/Thesis_CH1/Matrices/visitor_macros.h:32:41: note: expanded from macro 'CHECK_AND_SET_VISITOR_FUNCTION'
case mxFUNCTION_CLASS: case 23:
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:247:13: warning: case value not in enumerated type 'mxClassID' [-Wswitch]
CHECK_AND_SET_VISITOR_FUNCTION(vis,discover_vertex,d_vis);
^
/Volumes/easystore/Thesis_CH1/Matrices/visitor_macros.h:32:41: note: expanded from macro 'CHECK_AND_SET_VISITOR_FUNCTION'
case mxFUNCTION_CLASS: case 23:
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:248:13: warning: case value not in enumerated type 'mxClassID' [-Wswitch]
CHECK_AND_SET_VISITOR_FUNCTION(vis,examine_vertex,d_vis);
^
/Volumes/easystore/Thesis_CH1/Matrices/visitor_macros.h:32:41: note: expanded from macro 'CHECK_AND_SET_VISITOR_FUNCTION'
case mxFUNCTION_CLASS: case 23:
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:249:13: warning: case value not in enumerated type 'mxClassID' [-Wswitch]
CHECK_AND_SET_VISITOR_FUNCTION(vis,finish_vertex,d_vis);
^
/Volumes/easystore/Thesis_CH1/Matrices/visitor_macros.h:32:41: note: expanded from macro 'CHECK_AND_SET_VISITOR_FUNCTION'
case mxFUNCTION_CLASS: case 23:
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:251:13: warning: case value not in enumerated type 'mxClassID' [-Wswitch]
CHECK_AND_SET_VISITOR_FUNCTION(vis,examine_edge,d_vis);
^
/Volumes/easystore/Thesis_CH1/Matrices/visitor_macros.h:32:41: note: expanded from macro 'CHECK_AND_SET_VISITOR_FUNCTION'
case mxFUNCTION_CLASS: case 23:
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:252:13: warning: case value not in enumerated type 'mxClassID' [-Wswitch]
CHECK_AND_SET_VISITOR_FUNCTION(vis,edge_relaxed,d_vis);
^
/Volumes/easystore/Thesis_CH1/Matrices/visitor_macros.h:32:41: note: expanded from macro 'CHECK_AND_SET_VISITOR_FUNCTION'
case mxFUNCTION_CLASS: case 23:
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:253:13: warning: case value not in enumerated type 'mxClassID' [-Wswitch]
CHECK_AND_SET_VISITOR_FUNCTION(vis,edge_not_relaxed,d_vis);
^
/Volumes/easystore/Thesis_CH1/Matrices/visitor_macros.h:32:41: note: expanded from macro 'CHECK_AND_SET_VISITOR_FUNCTION'
case mxFUNCTION_CLASS: case 23:
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:255:36: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex *' (aka 'int *') [-Wincompatible-pointer-types]
dijkstra_sp_visitor(n, ja, ia, a,
^~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:190:34: note: passing argument to parameter 'ja' here
mbglIndex nverts, mbglIndex *ja, mbglIndex *ia, double weight, / connectivity params */
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:255:40: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex *' (aka 'int *') [-Wincompatible-pointer-types]
dijkstra_sp_visitor(n, ja, ia, a,
^~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:190:49: note: passing argument to parameter 'ia' here
mbglIndex nverts, mbglIndex *ja, mbglIndex *ia, double weight, / connectivity params */
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:257:20: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex ' (aka 'int ') [-Wincompatible-pointer-types]
d, (mwIndex)pred, dinf, d_vis);
^~~~~~~~~~~~~~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:192:27: note: passing argument to parameter 'pred' here
double d, mbglIndex *pred, double dinf,
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:261:28: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex *' (aka 'int *') [-Wincompatible-pointer-types]
dijkstra_sp(n, ja, ia, a,
^~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:185:34: note: passing argument to parameter 'ja' here
mbglIndex nverts, mbglIndex *ja, mbglIndex *ia, double weight, / connectivity params */
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:261:32: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex *' (aka 'int *') [-Wincompatible-pointer-types]
dijkstra_sp(n, ja, ia, a,
^~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:185:49: note: passing argument to parameter 'ia' here
mbglIndex nverts, mbglIndex *ja, mbglIndex *ia, double weight, / connectivity params */
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:263:20: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex ' (aka 'int ') [-Wincompatible-pointer-types]
d, (mwIndex)pred, dinf);
^~~~~~~~~~~~~~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:187:27: note: passing argument to parameter 'pred' here
double d, mbglIndex *pred, double dinf);
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:275:13: warning: case value not in enumerated type 'mxClassID' [-Wswitch]
CHECK_AND_SET_VISITOR_FUNCTION(vis,initialize_vertex,bf_vis);
^
/Volumes/easystore/Thesis_CH1/Matrices/visitor_macros.h:32:41: note: expanded from macro 'CHECK_AND_SET_VISITOR_FUNCTION'
case mxFUNCTION_CLASS: case 23:
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:277:13: warning: case value not in enumerated type 'mxClassID' [-Wswitch]
CHECK_AND_SET_VISITOR_FUNCTION(vis,examine_edge,bf_vis);
^
/Volumes/easystore/Thesis_CH1/Matrices/visitor_macros.h:32:41: note: expanded from macro 'CHECK_AND_SET_VISITOR_FUNCTION'
case mxFUNCTION_CLASS: case 23:
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:278:13: warning: case value not in enumerated type 'mxClassID' [-Wswitch]
CHECK_AND_SET_VISITOR_FUNCTION(vis,edge_relaxed,bf_vis);
^
/Volumes/easystore/Thesis_CH1/Matrices/visitor_macros.h:32:41: note: expanded from macro 'CHECK_AND_SET_VISITOR_FUNCTION'
case mxFUNCTION_CLASS: case 23:
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:279:13: warning: case value not in enumerated type 'mxClassID' [-Wswitch]
CHECK_AND_SET_VISITOR_FUNCTION(vis,edge_not_relaxed,bf_vis);
^
/Volumes/easystore/Thesis_CH1/Matrices/visitor_macros.h:32:41: note: expanded from macro 'CHECK_AND_SET_VISITOR_FUNCTION'
case mxFUNCTION_CLASS: case 23:
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:280:13: warning: case value not in enumerated type 'mxClassID' [-Wswitch]
CHECK_AND_SET_VISITOR_FUNCTION(vis,edge_minimized,bf_vis);
^
/Volumes/easystore/Thesis_CH1/Matrices/visitor_macros.h:32:41: note: expanded from macro 'CHECK_AND_SET_VISITOR_FUNCTION'
case mxFUNCTION_CLASS: case 23:
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:281:13: warning: case value not in enumerated type 'mxClassID' [-Wswitch]
CHECK_AND_SET_VISITOR_FUNCTION(vis,edge_not_minimized,bf_vis);
^
/Volumes/easystore/Thesis_CH1/Matrices/visitor_macros.h:32:41: note: expanded from macro 'CHECK_AND_SET_VISITOR_FUNCTION'
case mxFUNCTION_CLASS: case 23:
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:283:40: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex *' (aka 'int *') [-Wincompatible-pointer-types]
bellman_ford_sp_visitor(n, ja, ia, a,
^~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:201:34: note: passing argument to parameter 'ja' here
mbglIndex nverts, mbglIndex *ja, mbglIndex *ia, double weight, / connectivity params */
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:283:44: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex *' (aka 'int *') [-Wincompatible-pointer-types]
bellman_ford_sp_visitor(n, ja, ia, a,
^~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:201:49: note: passing argument to parameter 'ia' here
mbglIndex nverts, mbglIndex *ja, mbglIndex *ia, double weight, / connectivity params */
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:285:16: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex ' (aka 'int ') [-Wincompatible-pointer-types]
d, (mwIndex)pred, dinf, bf_vis);
^~~~~~~~~~~~~~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:203:27: note: passing argument to parameter 'pred' here
double d, mbglIndex *pred, double dinf,
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:289:32: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex *' (aka 'int *') [-Wincompatible-pointer-types]
bellman_ford_sp(n, ja, ia, a,
^~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:196:34: note: passing argument to parameter 'ja' here
mbglIndex nverts, mbglIndex *ja, mbglIndex *ia, double weight, / connectivity params */
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:289:36: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex *' (aka 'int *') [-Wincompatible-pointer-types]
bellman_ford_sp(n, ja, ia, a,
^~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:196:49: note: passing argument to parameter 'ia' here
mbglIndex nverts, mbglIndex *ja, mbglIndex *ia, double weight, / connectivity params */
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:291:16: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex ' (aka 'int ') [-Wincompatible-pointer-types]
d, (mwIndex)pred, dinf);
^~~~~~~~~~~~~~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:198:27: note: passing argument to parameter 'pred' here
double d, mbglIndex *pred, double dinf);
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:298:19: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex *' (aka 'int *') [-Wincompatible-pointer-types]
dag_sp(n, ja, ia, a,
^~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:207:34: note: passing argument to parameter 'ja' here
mbglIndex nverts, mbglIndex *ja, mbglIndex *ia, double weight, / connectivity params */
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:298:23: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex *' (aka 'int *') [-Wincompatible-pointer-types]
dag_sp(n, ja, ia, a,
^~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:207:49: note: passing argument to parameter 'ia' here
mbglIndex nverts, mbglIndex *ja, mbglIndex *ia, double weight, / connectivity params */
^
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl_sp_mex.c:300:16: warning: incompatible pointer types passing 'mwIndex *' (aka 'unsigned long *') to parameter of type 'mbglIndex ' (aka 'int ') [-Wincompatible-pointer-types]
d, (mwIndex)pred, dinf);
^~~~~~~~~~~~~~
/Volumes/easystore/Thesis_CH1/Matrices/matlab_bgl.h:209:27: note: passing argument to parameter 'pred' here
double d, mbglIndex *pred, double dinf);
^
28 warnings generated.
Error using mex
Undefined symbols for architecture x86_64:
"_bellman_ford_sp", referenced from:
_mexFunction in matlab_bgl_sp_mex.o
"_bellman_ford_sp_visitor", referenced from:
_mexFunction in matlab_bgl_sp_mex.o
"_dag_sp", referenced from:
_mexFunction in matlab_bgl_sp_mex.o
"_dijkstra_sp", referenced from:
_mexFunction in matlab_bgl_sp_mex.o
"_dijkstra_sp_visitor", referenced from:
_mexFunction in matlab_bgl_sp_mex.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks!
-Daniel Kozar
PhD Student
UC Davis