I am using some instruction provided by code developer to compile the library. However i am getting the error as shown in the figure. Does anybody has any idea about this? It is my first time to use mex
mex LDFLAGS="\$LDFLAGS -Wl,-rpath,\." nativeborg.cpp libborg.so
I was trying to compile using mex in matlab in linux.
mex doesn't directly recognize C++ compiler or linker options. You have two options:
Temporarily append options to existing options:
mex CXXFLAGS=['$CXXFLAGS, 'your compiler options string'] filename
mex LDFLAGS=['$LDFLAGS, 'your linker options string'] filename
Both depend on what platform you are using. For example on windows you have to use COMPFLAGS instead of CXXFLAGS. The advantage of (1) is that it is already set to use the correct option names for the platform. See "Override Default Compiler Switch" in the "mex" documentation.