Fortran specify that the gateway routine is in

This preview shows 3 out of 4 pages.

the list determines which linker to use. -fortran Specify that the gateway routine is in Fortran. This option overrides the assumption that the first source file in the list determines which linker to use. Options File Details: There are template options files for the compilers that are supported by MEX. These templates are located at [matlabroot '\bin\win32\mexopts'] or [matlabroot '\bin\win64\mexopts'] on Windows, or [matlabroot '/bin'] on UNIX. These template options files are used by the -setup option to define the selected default options file. Override Option Details: Use the name=value command-line argument to override a variable specified in the options file at the command line. When using this option, you may need to use the shell's quoting syntax to protect characters such as spaces, which have a meaning in the shell syntax. On Windows platforms, at either the MATLAB prompt or the DOS prompt, use double quotes ("):
Image of page 3

Subscribe to view the full document.

mex -v COMPFLAGS="$COMPFLAGS -Wall" ... LINKFLAGS="$LINKFLAGS /VERBOSE" yprime.c At the MATLAB command line on UNIX platforms, use double quotes ("). Use the backslash (\) escape character before the dollar sign ($). mex -v CFLAGS="\$CFLAGS -Wall" LDFLAGS="\$LDFLAGS-w" yprime.c At the shell command line on UNIX platforms, use single quotes ('): mex -v CFLAGS='$CFLAGS -Wall' LDFLAGS='$LDFLAGS -w' yprime.c Engine/MAT Stand-alone Application Details: For stand-alone engine and MAT-file applications, MEX does not use the default options file; you must use the -f option to specify an options file. The options files used to generate stand-alone MATLAB engine and MAT-file executables are named *engmatopts.bat on Windows, or engopts.sh and matopts.sh on UNIX, and are located in the same directory as the template options files referred to in the "Options File Details" section. Examples: The following command compiles "yprime.c", building a MEX-file: mex yprime.c When debugging, it is often useful to use "verbose" mode as well as include symbolic debugging information: mex -v -g yprime.c See also COMPUTER, DBMEX, LOADLIBRARY, MEXEXT, PCODE, PREFDIR, SYSTEM
Image of page 4
You've reached the end of this preview.
  • Fall '09
  • Object file, Executable, Linker

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern