E
eugene
I'm trying to compile and run some c++ code to be called from Matlab
(mex file)
and I'm getting "Invalid MEX-file ... undefined symbol" error. Anybody
knows
where to look for solution?
-> g++ -c ... abc.cpp
-> gcc -c ... /usr/local/matlab701/extern/src/mexversion.c
-> g++ ... -o abc.mexglx abc.o mexversion.o ... -L/home/eugene/lib
.... -lxyz ...
No errors so far.
??? Invalid MEX-file '/home/eugene/matlab/abc.mexglx':
/home/eugene/lib/libxyz.so: undefined symbol: xyz_debug.
Code for libxyz.so has:
extern int xyz_debug;
abc.cpp has:
int xyz_debug = 0;
(mex file)
and I'm getting "Invalid MEX-file ... undefined symbol" error. Anybody
knows
where to look for solution?
-> g++ -c ... abc.cpp
-> gcc -c ... /usr/local/matlab701/extern/src/mexversion.c
-> g++ ... -o abc.mexglx abc.o mexversion.o ... -L/home/eugene/lib
.... -lxyz ...
No errors so far.
??? Invalid MEX-file '/home/eugene/matlab/abc.mexglx':
/home/eugene/lib/libxyz.so: undefined symbol: xyz_debug.
Code for libxyz.so has:
extern int xyz_debug;
abc.cpp has:
int xyz_debug = 0;