I've never tried it, so there may be a workaround, but the documentation specifically says that you can't load a Compiler generated dll using loadlibrary.
See the limitations section of,
http://www.mathworks.com/help/matlab/ref/loadlibrary.html
Phil.
See the limitations section of,
http://www.mathworks.com/help/matlab/ref/loadlibrary.html
Phil.