Using the C Math Library    

Linking Applications Without mbuild 

To build any of the examples or your own applications without mbuild, compile the file with an ANSI C compiler. You must set the include file search path to contain the directory that contains the file matlab.h; compilers typically use the  -I switch to add directories to the include file search path. See Appendix A to determine where matlab.h is installed. Link the resulting object files against the libraries in this order:

  1. MATLAB M-File Math Library (libmmfile)
  2. MATLAB Built-In Library (libmatlb)
  3. MATLAB MAT-File Library (libmat)
  4. MATLAB Application Program Interface Library (libmx)
  5. ANSI C Math Library (libm)

Specifying the libraries in the wrong order on the command line typically causes linker errors.

On some platforms, additional libraries are necessary. See the platform-specific section of the mbuild script for the names and order of these libraries.

On PCs, import libraries can be found in <matlab>\extern\lib\win32\<compiler>.


 Troubleshooting mbuild Working with MATLAB Arrays