File Exchange

image thumbnail

Access a MATLAB Compiler Generated DLL

version 1.2.0.1 (9.88 KB) by

Use WIN32 api to load Compiler generated dll at runtime.

3.66667
8 Ratings

3 Downloads

Updated

View License

Use the WIN32 api to load, initialize and access a MATLAB Compiler generated dll at runtime.

Comments and Ratings (8)

Tortuka

Duy Trinh

I am using MSVC++6.0 and MATLAB Component Runtime V7.4 to run this application. I try to compile the sample code but have this error. Any idea how to solve it?

LoadLibrary.obj : error LNK2001: unresolved external symbol _mclTerminateApplication
LoadLibrary.obj : error LNK2001: unresolved external symbol _mclInitializeApplication
LoadLibrary.obj : error LNK2001: unresolved external symbol _mclGetEmptyArray
LoadLibrary.obj : error LNK2001: unresolved external symbol _mclcppGetLastError
LoadLibrary.obj : error LNK2001: unresolved external symbol _mclcppCreateError
LoadLibrary.obj : error LNK2001: unresolved external symbol _ref_count_obj_addref
LoadLibrary.obj : error LNK2001: unresolved external symbol _ref_count_obj_release
LoadLibrary.obj : error LNK2001: unresolved external symbol _error_info_get_message
LoadLibrary.obj : error LNK2001: unresolved external symbol _mclGetMatrix
LoadLibrary.obj : error LNK2001: unresolved external symbol _char_buffer_get_buffer
LoadLibrary.obj : error LNK2001: unresolved external symbol _array_ref_to_string
LoadLibrary.obj : error LNK2001: unresolved external symbol _array_ref_getV_int
LoadLibrary.obj : error LNK2001: unresolved external symbol _array_ref_set_numeric_mxInt32
Debug/LoadLibrary.exe : fatal error LNK1120: 13 unresolved externals

Wei Li

I have tried the sln project provided and found no errors:) I am not sure what happened. I suggest you open the sln in the default setting.

1. set the corresponding include and library directory in your MSVC7.0
2. link mclmcr.lib
3. copy the ctf, dll and .h file to the working directory

Anuj Garg

I am using MSVC++7.0 and MATLAB Component Runtime V7.4 to run this application.

I have tried to run this sample code, but it is not working.

When I am compiling this application using VC++ 7.0 compiler it is searching for mclmcr.lib file, which does not exist in my Matlab Component Runtime folder. And compiler was giving linking error. So I am using "mclmcrrt.lib" instead of "mclmcr.lib" file.

When I am running this application the "libaplusb.dll" is not loading through LoadLibrary and getting error ("Module Not Found").

Could you please suggest me the solution to my problem ?

Wei Li

Wonderful work.
and how to link the graphics library into LIB file?
many thanks

Muhammad Fermi Pasha

please disregard my previous post.. the code works fine actually, I compile it wrong.. my bad ;) but it is just I can't run it in deployed machine without matlab (but with mcr).

Muhammad Fermi Pasha

why is it I cannot load the library? I already recompile everything, but it keeps telling me could not load aplusb.. I also already try to register the dll but it failed as well..
any idea?

Scott Pearson

When I tried to recompile the code under Release 14 SP2, I could not access the main aplusb function in the new DLL.

Updates

1.2.0.1

Updated license

1.2

Cleaned up binaries

1.1

licence issues

MATLAB Release
MATLAB 7 (R14)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

libraryexample/aplusb/