Re: Build executable from GUI which uses an existi



Managed to answer my own question, at least partially.

The problem compiling a standalone program that uses VFM.dll goes
away if you rebuild the VFM.dll using mex on the version of matlab
that you use the compiler with. In other words, it seems to be a
problem if you try to compile a program that uses the distributed
dll.

Yet again this seems to be a case where Matlab works fine in one
instance (ie. from the command window) and then fails inexplicably in
another, and there doesn't seem to be any way to find any advice on
it on the support website.

to recompile the dll, use:
mex main.cpp CaptureFrame.cpp ImgBuffer.cpp MenuItem.cpp stdafx.cpp
meximports.lib vfw32.lib

then rename the created main.dll as vfm.dll (sure there's a compiler
switch to do this, but frankly can't be bothered spending another
second looking through the documentation after the amount of time
this problem has wasted)

Hope this helps
Phil

Phil W wrote:
>
>
> Has anyone managed to get to the bottom of this? I'm having the
> same
> problem - I have GUI that accesses the webcam via VFM, which works
> well inside Matlab and compiles without warnings, but when I
> compile
> and run the standalone version, the program can't access the
> webcam.
>
> Any thoughts? Is it even possible to call dlls from Matlab
> standalone programs?
>
> Many thanks
> Phil
.



Relevant Pages

  • Re: newbie question: creating my first mex-file - compiling on windows xp
    ... > Which compiler should I download in order to get started? ... For mex, LCC that comes wirth matlab suffices for getting started. ... Install the MS Visual studio first, and see if there are more options ...
    (comp.soft-sys.matlab)
  • Re: #include
    ... So bin ich in der Lage meine C-Routinen zu kompilieren und in Matlab ... Der Borland Compiler gibt mir hier immer Feedback wenns ... Mex file entry point is missing. ...
    (comp.soft-sys.matlab)
  • Re: Indexing for a set of matrices
    ... use this command if you are using the Lcc compiler that ships with MATLAB: ... mex myCmexFile.c ...
    (comp.soft-sys.matlab)
  • Re: mex and snowleopard
    ... Use the file command line tool (escaped,!file from within MATLAB) to ... against match the architecture for the MEX command. ... If this is a compiler issue, ...
    (comp.soft-sys.matlab)
  • Re: Matlab7.0.4, Problems with fortran mex functio
    ... I don't care much for ever compiling mex functions in matlab. ... fortran wrapper with a command like ... Could not find the compiler "fl32" on the DOS path. ...
    (comp.soft-sys.matlab)