View previous topic :: View next topic |
Author |
Message |
MartinW
Joined: 14 Jun 2005 Posts: 1
|
Posted: Tue Jun 14, 2005 3:39 am Post subject: Is it possible to use Salford DLLs with C++.Net Gateway DLLs |
|
|
Hello!
I just upgraded to Salford 4.8. I'm trying to start a Salford DLL from a C++ mex funktion in Matlab 7.0. If I do so in Simulink Matlab crashes imediately without any usefull error message. From the Matlab prompt I recieve this:
??? Unknown Windows exception value=c0000090 in MATLAB.
I looked it up and it's a floating point exception. I could determin the operation causing it on the fortran side by writing a test file.
1. I can pass a constant from fortran to Matlab.
2. I can pass arguments from matlab to fortran and back without a crash.
3. But the moment I try to calculate with Matlab originated data I have problems.
I tested it with integer conversion nint(). The first time I call it from the prompt everything is fine. I get the correct result. But on the second call I get the error mentioned above.
Any idea how to solve my problem with salford? Thank's for your help!
Martin |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Jun 21, 2005 1:46 am Post subject: Is it possible to use Salford DLLs with C++.Net Gateway DLLs |
|
|
In principle is it possible to use an FTN95 DLL as a mex function in Matlab.
However, you will need guidelines on how to do this.
I hope to provide details in the Knowledge Base before too long.
You may be able to make some progress given the following two points.
a) You must use F_STDCALL in the declarations of all exported subroutines in your DLL.
b) Currently there is an intialisation bug that causes the first call to the DLL (from Matlab) to raise an exception. Subsequent calls are OK. |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Tue Jul 18, 2006 4:20 am Post subject: Is it possible to use Salford DLLs with C++.Net Gateway DLLs |
|
|
Hello,
I am experiencing problems too with creating a DLL from a salford fortan mex-function in matlab 704.
I use a salford fortran library subfun.lib which has been created using salford.
I create mex file fun.dll using compaq visual fortran with command "mex fun.f subfun.lib". fun.dll is created
However, calling fun.dll sometimes produce error message (and sometimes result is correct)
??? Unknown Windows exception value=c0000090 in MATLAB.
Is there some information about matlab mex-file compatibilty with salford lib ?
Helene |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Jul 18, 2006 5:25 am Post subject: Is it possible to use Salford DLLs with C++.Net Gateway DLLs |
|
|
Helene
There is now some information on using MATLAB with FTN95 in the Silverfrost forum KBase. |
|
Back to top |
|
|
|