How do i create a mex file

zhaozj2021-02-16  84

Solution Number: 31087

Date last modified: 2003-12-10 Product: Matlab 6.1 ==> Current Version Platform: Information Not Available

Problem DescriptionHow Do I CREATE A MEX FILE Using The Microsoft Developer Studio and Compaq Visual Fortran 6.5?

.................................................

Solution: Compiling MEX-Files with the MSDEV IDE for Compaq Visual Fortran 6.5:

To Build Mex-Files with the MSDEV IDE for Compaq Visual Fortran 6.5:

1. Inside the IDE, go to FILE -...> NEW Select "Fortran Dynamic Link Library" Provide a project name In the event you do not see this option, please check the installation of Compaq Visual Fortran There should be an. .AWX File That Should Be Installed by Compaq Visual Fortran. If Not Check with Compaq for Troubleshooting.

2. CREATE AN Empty DLL PROJECT.

3. Once the project is created, add the files yprimefg.F and yprimef.F from the $ MATLAB / extern / examples / mex / directory to your project. Here, $ MATLAB refers to the root MATLAB directory on your computer.

4. Create a file with extension .DEF and add it to the project (anywhere should be fine; resources for example). The .DEF file should have the following text (if your project name is myproj, then a dll will be created called MyProj.dll, Used Below:

Library myproj.dll exports _mexfunction @ 16

. 5. Select the menu Project -> Settings ... Here, under Fortran, please change the following: Fortran tab: a Category: Fortran Language Source Form: Force fixed form Fixed form length: 80 columns b Category: External Procedures. External Name Interpretation: Upper case Argument Passing convention: Default String Length Argument Passing: After All Args Link tab: a Category Input:. Add these libraries to Object / library modules: libmx.lib libmex.lib libmat.lib .... Additional .

We expect that similar steps are performed for Compaq Visual Fortran 6.6. It is not practical, however, for us to offer complete technical support on the details of using any specific one of the large number of IDE environments our customers use. If you need detailed assistance with the particular settings needed to get your IDE environment to generate code that successfully compiles and runs with our products, we suggest you contact the manufacturer of your IDE to get information or expert technical assistance in using it.

转载请注明原文地址:https://www.9cbs.com/read-17322.html

New Post(0)