Date: Dec 28, 2012 9:17 AM
Subject: Unload Libraries of the Fixed-Point Toolbox
I have a custom mex file that computes the minkowski sum of two polygons and uses two libraries (MPFR and MPIR) that are based on the gnu multi-precision library. These libraries seem to conflict with Matlab's Fixed-Point Toolbox. However, I need to use both, the mex file and the Fixed-Point Toolbox, though not at the same time. It would be ok to execute the mex file first, unload the mex file (clear mex), then run the function from the Fixed-Point Toolbox, unload the Fixed-Point Toolbox and then run the mex file again, etc.
So my question is if there is a possibility to unload the libraries loaded by the Fixed-Point Toolbox the same way I can unload the libraries loaded by the mex file.
Here are some details:
The mex file does normally work. It does not work if I execute any function of the Fixed-Point Library before executing the mex file, i.e. when fitools.dll is loaded. (The error says "The specified procedure could not be found" which seems to imply that some dll could not be loaded.)
If I execute the mex file first and then execute any function of the Fixed-Point Toolbox, there is an error saying that fitools.dll cannot be loaded. I noticed that fitools.dll uses gmp.dll (the dll of the GNU Multiprecision library), so I assume the MPFR or MPIR library I use conflict with the gmp.dll of the Fixed-Point Toolbox.