3.66667

3.7 | 8 ratings Rate this file 14 Downloads (last 30 days) File Size: 9.88 KB File ID: #6762

Access a MATLAB Compiler Generated DLL

by Todd Flanagan

 

20 Jan 2005 (Updated 11 Jan 2010)

Use WIN32 api to load Compiler generated dll at runtime.

| Watch this File

File Information
Description

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

Acknowledgements
This submission has inspired the following:
From Fortran, call MATLAB Compiler C shared library
Required Products MATLAB Compiler
MATLAB release MATLAB 7 (R14)
Other requirements Windows only.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
12 Oct 2005 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.

28 Feb 2006 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?

08 Mar 2006 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).

19 Dec 2006 Wei Li

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

20 Dec 2006 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 ?

02 Jan 2007 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

27 Jun 2007 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

01 Feb 2010 Tortuka  
Please login to add a comment or rating.
Updates
17 Dec 2009

licence issues

11 Jan 2010

Cleaned up binaries

Tag Activity for this File
Tag Applied By Date/Time
external interface Todd Flanagan 22 Oct 2008 07:39:56
loadlibrary Todd Flanagan 22 Oct 2008 07:39:56
mcc Todd Flanagan 22 Oct 2008 07:39:56
dll Todd Flanagan 22 Oct 2008 07:39:56
external coding Todd Flanagan 22 Oct 2008 07:39:56
utilities Todd Flanagan 22 Oct 2008 07:39:56
dll Brian 19 Jun 2009 20:54:38
dll yhd haodong 04 Jan 2010 07:41:44
dll Srikiran chinta 08 Jul 2010 02:36:35
dll Andrew K 11 Nov 2011 09:44:57
dll Caio renan 10 Apr 2012 06:57:54
external coding Caio renan 10 Apr 2012 07:00:58
loadlibrary Caio renan 10 Apr 2012 07:01:05
external interface Caio renan 10 Apr 2012 07:01:09
mcc Caio renan 10 Apr 2012 07:01:15
utilities Caio renan 10 Apr 2012 07:01:17
dll laurent 26 Apr 2012 12:56:57

Contact us at files@mathworks.com