| 1 |
Compiling Your Application |
| 2 |
========================== |
| 3 |
|
| 4 |
Include Files |
| 5 |
------------- |
| 6 |
|
| 7 |
Make sure that your application includes the main libMariaS3 include as follows: |
| 8 |
|
| 9 |
.. code-block:: c |
| 10 |
|
| 11 |
#include <libmarias3/marias3.h> |
| 12 |
|
| 13 |
This will pull in all the libMariaS3 functions and constants you may require for your application. |
| 14 |
|
| 15 |
Package Config |
| 16 |
-------------- |
| 17 |
|
| 18 |
libMaria3e includes a utility called ``libmarias3-config``. This can give you all the options used to compile the library as well as the compiler options to link the library. For a full list of what it providesrun: |
| 19 |
|
| 20 |
.. code-block:: bash |
| 21 |
|
| 22 |
libmarias3-config --help |
| 23 |
|
| 24 |
Compiling |
| 25 |
--------- |
| 26 |
|
| 27 |
If the library is installed correctly in your Linux distribution compiling your application with libMariaS3 should be a simple matter of adding the library to link to as follows: |
| 28 |
|
| 29 |
.. code-block:: bash |
| 30 |
|
| 31 |
gcc -o basic basic.c -lmarias3 |
| 32 |
|
| 33 |
And likewise for CLang: |
| 34 |
|
| 35 |
.. code-block:: bash |
| 36 |
|
| 37 |
clang -o basic basic.c -lmarias3 |