Math Vector Library
Installation and Users Guide
Version 1.0 DD-00001-000

4.2 Compiling against the Library (C/C++)

In order to use the product, the header search path of the C/C++ compiler needs to be set to the include directory inside the distribution directory.

In order to link with the library the library search path needs to include lib or lib64 directories inside the distribution directory and the application needs to be linked against the respective library used. See  5 for the variants of the library available.

This can be accomplished as follows for the following compilers:

GNU C/C++ Compiler, LLVM clang/clang++, Portland Group Compiler, IBM XL C/C++


For the include search path use the -I flag, such as: -I/opt/adelsbach/mvecXY/include.
For the library search path use the -L flag, such as: -I/opt/adelsbach/mvecXY/lib or -I/opt/adelsbach/mvecXY/lib64 for 64bit systems.
For linking against libmvec use the -l flag, such as: -lmvec.

Microsoft Visual Studio


Right-click in your Solution Exporer and Select Properties.
Add the folder the distribution was extracted to under Additional Library Directories.
Add the library to link against under Linker -> Input -> Additional Dependencies.
Add the header file folder under C/C++ -> Additional Include Directories.