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:
libmmfile
)
libmatlb
)
libmat
)
libmx
)
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 | ![]() |