This example shows how to build and run the Fortran example
fengdemo.F on Windows® platforms.
Start MATLAB® as a user with administrator privileges. Based on your User Account Control (UAC) settings, you might need to right-click the MATLAB icon and select Run as administrator. If that option is not available, contact your system administrator.
Register MATLAB as a COM server.
MATLAB displays a second, minimized command window. Close that window.
Make note of the value of
matlabroot (the folder where
MATLAB is installed) and the value returned by the MATLAB
computer('arch') command. You will use the value
later to set the run-time library path in a
set PATH command.
res = fullfile(matlabroot,'bin',computer('arch'))
Verify that your current folder is writable and copy the example.
Choose a compiler, if necessary.
mex -setup -client engine Fortran
Build the application.
mex -v -client engine fengdemo.F
Open a Windows command prompt.
Set the run-time library path by modifying the system
variable. Use the value
res from the previous step. Make sure that you
; path terminator character.
Run the example. The
fengdemo application must be on your system
MATLAB starts and displays a figure.
1 <Enter> at the system prompt to continue and exit.