Be the first to rate this file! 16 downloads (last 30 days) File Size: 10.38 KB File ID: #16026

Calling functions from a user defined shared library

by Vincent Leclercq

 

21 Aug 2007 (Updated 21 Aug 2007)

Code covered by BSD License  

Demonstrates how to use the loadlibrary function,and use of pointers

Download Now | Watch this File

File Information
Description

This package is composed in fact of 2 things :
- First thing is MATLAB M file, with a dll and a header file. This script shows how to call some functions from the dll included
- The zip file included is the complete Visual studio project, in Visual Studio .NET format, in order to build the Dll called by the MATLAB script

MATLAB release MATLAB 7.4 (R2007a)
Other requirements You need to have MS Visual Studio in order to compile the dll. Anyway, you can still call the dll without any compiler, ut you won't be able to change anything from the dll. Visual Studio Express should also work to compile the Dll
Zip File Content  
Other Files Calling External dll/CallingExternalDLL.m,
Calling External dll/Lib_Math.dll,
Calling External dll/Lib_Math.h,
Calling External dll/Lib_Math.zip,
Calling External dll/readme.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
21 Aug 2007 Marcelo Perlin

I'm running it, but, even though I'm in the same working dir, I get the error:

??? There was an error loading the library "C:\Program Files\MATLAB\R2006a\work\Calling_external\Calling External dll\Lib_Math.dll"
Error using ==> loaddefinedlibrary
The specified module could not be found.

Error in ==> loadlibrary at 273
    diagnoseError(err);

Error in ==> CallingExternalDLL at 12
loadlibrary('Lib_Math','Lib_Math.h');

Am I missing any requirement ?

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
external interface Vincent Leclercq 22 Oct 2008 09:23:44
dll library pointer Vincent Leclercq 22 Oct 2008 09:23:44
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com