MATLAB: Do I receive the warning “library class already exists” using LOADLIBRARY in MATLAB 7.0 (R14)

loadlibraryMATLABunloadlibrary

When I run the following code:
hfile = [matlabroot '\extern\include\matrix.h'];
loadlibrary('libmx.dll', hfile)
I receive the following warning:
Warning: The library class 'libmx' already exists

Best Answer

This warning occurs in MATLAB 7.0 (R14) and later due to the fact that the library class has already been loaded.
To prevent this warning, use the UNLOADLIBRARY command:
unloadlibrary libmx
hfile = [matlabroot '\extern\include\matrix.h'];
loadlibrary('libmx.dll', hfile)