mlimber wrote:
> eugene wrote:
> > 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?
>
> A MATLAB newsgroup or on the MathWorks website would probably be better
> places to start. This group is for discussing C++ language issues, not
> third-party tools.
>
> Cheers! --M
Been there, done that

MathWorks website: do c++ at your own risk
MATLAB newsgroup: this is c/c++ problem
- symbol xyz_debug is defined in abc.cpp as "int xyz_debug = 0;"
- symbol xyz_debug is referenced in libxyz.so as "extern int
xyz_debug;"
The question is why after
-> 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 ...
try to run and got "undefined symbol xyz_debug" error?