Make sure you have the latest version of mtoc++, see Downloading mtoc++ 1.5. Next step after installation is Configuration and use of mtoc++
The following programs need to be available on your machine in order to use mtoc++:
doxygen
(>=1.8.1): mtoc++ is a filter for doxygen. If not yet available, get it at http://www.doxygen.orgThe following programs will highly improve your documentation creation experience if available:
dot:
A Graphviz tool that allows doxygen to create nice graphics for inheritance trees and collaboration diagrams.latex:
Required to use LaTeX processing capabilities of doxygen (e.g. http://www.latex-project.org/ftp.html). mtoc++ comes with some markups for better latex inclusion into the text flow. Also, easy inclusion of external latex sources and styles is included in mtoc++'s tools.ghostscript:
If using formulas with doxygen and you are not using pdflatex or are on a windows machine, this is a prerequisite (see http://www.stack.nl/~dimitri/doxygen/install.html#install_bin_windows)If you want to build mtoc++ from source, you will also need:
If you are a windows user you can directly download the binaries at Downloading mtoc++ 1.5. Then simply place the binaries in a folder of your choice and add the folder to the PATH environment variable. If you intend to use the MatlabDocMaker, you can also copy the mtoc++ binaries into the "documentation configuration files" folder for your/each project, this path will be added to PATH by MatLab locally.
latex.exe
or gswin32c.exe
must be present in order for doxygen to work with LaTeX output. Make sure that you have all requirements available, otherwise doxygen or the MatlabDocMaker will complain soon enough. You can check/change your Windows PATH environment variable via the sequence We are trying to always compile current Windows binaries for mtocpp
and mtocpp_post
and include them for direct download.
For unix users we recommend to compile the sources following Compiling mtoc++ from source.
However, we also plan to provide some precompiled linux binaries/packages soon. If you find a matching choice you can use it and all you have to do is to ensure that the binaries can be found on the environment PATH.
Please check the Software requirements and recommendations when you intend to build mtoc++ yourself.
mtoc++ is built using the cmake (cross-platform make) tool. This tool is available for both unix and Windows, however, we only tested compiling our sources on linux and MS Visual Studio 2010.
For Windows compilation, you need a Windows C++ compiler (e.g. MinGW or Visual Studio). Then running the CMake GUI allows you to choose a compiler, specify any CMake configuration settings and create the makefiles/Visual Studio projects needed for compilation.
Furthermore, we're using the dirent.h
library for file access. As this is a linux library we've included a file dirent_msvc.h
in our source, which implements the dirent api for Microsoft Visual Studio and was written by Tony Ronkko. More information and downloads can be found at http://www.softagalleria.net/dirent.php.
The following procedure is an example of how to compile mtoc++ on a linux machine:
For installation under recent Apple OS like 10.8.2, the MacPorts project is a very useful tool to obtain prerequisites for mtoc++ compilation. Once installed, get ragel
and doxygen
via
The default value for the install prefix is /usr/local
, so the mtocpp binaries mtocpp
and mtocpp_post
go to /usr/local/bin
and the documentation is created inside /usr/local/share/doc/mtocpp
.
If you want the "make install" command to copy the binaries and documentation to different locations, you can choose them by setting the following variables:
So typing
will copy the binaries to /my/root/dir/bin
and the documentation to /my/docs
.
If you left the CUSTOM_DOC_DIR
flag empty the documentation would have gone to /my/root/dir/share/doc/mtocpp
mtoc++ comes with some unit tests to check for e.g. successful compilation. Run the tests by typing
in the same folder where you called cmake
.
On Windows, dedendent on your compiler, you will either have makefiles for the test cases or a separate Visual Studio project to run the tests.
Have fun!