matplotlib-cpp icon indicating copy to clipboard operation
matplotlib-cpp copied to clipboard

Undefined symbols for architecture arm64:....

Open cmezavalle opened this issue 2 years ago • 1 comments

Hello,

First, thanks for the great code. It is very helpful to have something nice to visualize the c++ results.

I have go through the code and it seems I am compiling it correctly. However, I am having the following error after the compilation:

"Undefined symbols for architecture arm64: "_engClose", referenced from: _main in MatlabPlot-8d1732.o "_engEvalString", referenced from: _main in MatlabPlot-8d1732.o "_engGetVariable", referenced from: _main in MatlabPlot-8d1732.o "_engOpen", referenced from: _main in MatlabPlot-8d1732.o "_engOutputBuffer", referenced from: _main in MatlabPlot-8d1732.o "_engPutVariable", referenced from: _main in MatlabPlot-8d1732.o "_mxCreateDoubleMatrix_800", referenced from: _main in MatlabPlot-8d1732.o "_mxDestroyArray_800", referenced from: _main in MatlabPlot-8d1732.o "_mxGetClassName_800", referenced from: _main in MatlabPlot-8d1732.o "_mxGetPr_800", referenced from: _main in MatlabPlot-8d1732.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)"

I wonder if there is a solution for this. I am running in an M1 MacBook Pro.

Thanks in advance.

cmezavalle avatar Apr 20 '23 17:04 cmezavalle

I don't have access to an M1 mac unfortunately and I haven't seen that particular error before, but it's true that the compilation on the M1 can be tricky... This looks like a similar issue, maybe that could help? https://github.com/PyO3/pyo3/issues/2136

Cryoris avatar May 03 '23 12:05 Cryoris