Using the C++ Math Library | ![]() ![]() |
Linking Applications Without mbuild
To build the examples or your own applications without mbuild
, compile the file with a robust C++ compiler. The compiler you use must support both templates and exceptions. Set the include file search path to contain the directory that contains the file matlab.hpp
; compilers typically use the -I
switch to add directories to the include file search path. See Appendix A to determine where matlab.hpp
is installed. Link the resulting object files against the libraries in this order:
libmatpp
on UNIX; libmatp*
on Windows, where *
is replaced by the suffix for your compiler)
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 the platforms we support.
On PCs, import libraries can be found in <matlab>\extern\lib\win32\<compiler>
.
![]() | Troubleshooting mbuild | Distributing Stand-Alone Applications | ![]() |