I am getting an undefined reference to a MCR function `mclInitializeComponentInstanceWithEmbeddedCTF_proxy' when trying to build a C++ application in Eclipse. This function is defined in mclmcr.h and mclmcrrt.h as part of MCR, which are both included in the project. I am using the most recent version of MCR.
When I build the project: (omitted most .o files for clarity)
make all Building target: MYPROJECT Invoking: GCC C++ Linker g++ -L"/sandbox/path/to/my/lib" -L/usr/include/boost -L/opt/matlab/MATLAB_Compiler_Runtime/v717/runtime/glnx86 ./all/my/files.o -lboost_thread-mt -lboost_system -lboost_filesystem -lpthread -lmwmclmcrrt
/sandbox/path/to/my/lib/mylib.so: undefined reference to `mclInitializeComponentInstanceWithEmbeddedCTF_proxy' collect2: ld returned 1 exit status make: * [MYPROJECT] Error 1
Best Answer