TinyMAT
a library to write Matlab MAT-files
|
This page explains how to link against TinyMAT.
When using CMake to build your application, you can simply use target_link_libraries()
to link against TinyMAT and use CMake's find_package()
to enable that (see https://github.com/jkriege2/TinyMAT/tree/master/tests/extcmake_tinyMAT_test for an example):
TinyMAT_DIR
to
<INSTALLDIR>/lib/cmake/TinyMAT so CMake finds the TinyMATConfig.cmake
file there.When using CMake to build your application, you can also use CMake's FetchContent-API to download and include TinyMAT (see https://github.com/jkriege2/TinyMAT/tree/master/tests/extcmake_fetchcontent_tinyMAT_test for an example and https://cmake.org/cmake/help/latest/module/FetchContent.html for documentation on FetchContent):
You can also link against TinyMAT without using CMake. For this you simply have to supply the library as a parameter to your compile/link run, e.g. for GCC:
The -I
-option provides the search directory for include-files (i.e. headers) and the -L
-option the search path for the link libraries. Here we link against the release version TinyMAT_Release
, i.e. with config-decorated filename (see build options!). Check for the actual name of the libs on your system and plug in the appropriate name! If you build the library as a shared lib, you have to link e.g. against TinyMATShared_Release
, as the build-scripts add the word hared
to the library name for shared libs to distinguish them from the static libs.
Note that you might also have to provide additional libraries, depending on your system.