#235: passing MEXEXT to compile MEX files --------------------------------------+------------------------------------- Reporter: michel | Owner: sebastien Type: enhancement | Status: new Priority: critical | Milestone: 4.3 Component: Build system / Packaging | Version: Keywords: | --------------------------------------+------------------------------------- In Matlab, the extension name of the MEX file varies accross plateform. When we use USE_DLL and call the model file DLL in another DLL (it is the case for estimation, for example) we need to know this extension. Currently, the Matlab calling program use mexext() to get a string and passes this string to the, say, estimation DLL. This is very roundabout, because mexext() makes a system call to evaluate a batch file to learn the name of the MEX extension of a given system. I would prefer to know the extension name at the time of compilation of the DLL and hard code it in the DLL. Currently, the build system already puts the extension name in environment variable MEXEXT. I suggest the following modification to the Makefile: from MATLAB_DEFS = -D_GNU_SOURCE -DNDEBUG -DMATLAB_VERSION=0x0713 to MATLAB_DEFS = -DMEXEXT=${MEXEXT} -D_GNU_SOURCE -DNDEBUG -DMATLAB_VERSION=0x0713
Then, we can just use macrovariable MEXEXT in the C++ code when necessary.
The same can be used for OCTAVE but I expect the name of the extension to be always the same.
#235: passing MEXEXT to compile MEX files ---------------------------------------+------------------------------------ Reporter: michel | Owner: sebastien Type: enhancement | Status: closed Priority: critical | Milestone: 4.3 Component: Build system / Packaging | Version: Resolution: fixed | Keywords: ---------------------------------------+------------------------------------ Changes (by sebastien):
* status: new => closed * resolution: => fixed
Comment:
Fixed in a66594caedf0672ba81f4a19887aefc6f635eb88