From: kees de Kapper on
Hi All,

I'm working on a program that use a dll. It is fully working properly when running in Matlab. Now I want to make a standalone version of it. Compilation is fine but it fails running giving the error message: Undefined function or variable 'MyDLLTest_proto'.

To show you what I have done, here is my sample code, extracted from the real application:

===TestLoadDLL.m===========================
function TestLoadDLL
p = 'C:\StandaloneTest\';
[notfound,warnings] = loadlibrary([p,'MyDLL.dll'],[p,'MyDLL.h'], 'alias', 'MyDLLTest');
===========================================

Then I compile this script using:
mcc -ev -R -logfile -R output.TestLoadDLL_LOG C:\StandaloneTest\TestLoadDLL.m

When I launch the executable, it crashes with the following output:
=============================
There was an error loading the library
"C:\StandaloneTest\MyDLL.dll"
Undefined function or variable 'MyDLLTest_proto'.
==============================

What am I doing wrong, and what is the proper way of including/attaching dll's in standalone apps.

thanks in advance,

Kees
From: kees de Kapper on
I found these threads:

http://www.mathworks.de/matlabcentral/newsreader/view_thread/147571
http://www.mathworks.com/support/solutions/en/data/1-1AJI4/?solution=1-1AJI4

Problem solved.