- Table of contents
- Starting a unsio project
- uns_devel template
- Project compilation
- Adding a new source file
Starting a unsio project¶
Unsio package provides a template to start the development of projects using unsio library. It's located in the following directory:
From this template you can start projects using c,c++ or fortran language.
uns_devel template is a compilation tree with the following structure :
src/ <------ put your main source code (c,c++,fortan) lib/src/ <------ put your source files used to make a library (c,c++,fortran) cmake/ CMakeLists.txt README
- src directory
In this directory you will put your main sources code only. They can be in fortran, c or c++ language.
You'll find also two test programs, one in fortran language, unsio_fortran.F and the other in c++ language, unsio_c++.cc
- lib/src directory
Here you can put all the sources files that will be used as a library. A library called "libMYutils.so" will be build with all these files.
- cmake directory and CMakeLists.txt
You don't have to touch these files, they are used for compilation purpose.
Unsio example programs¶
In unsio/template/uns_devel/src directory there are two examples programs which use unsio library. One is in fortran language, "unsio_fortran.F" and the other is in C++ language, "unsio_c++.cc".
To configure and install your project, read the following link.
Adding a new source file¶
Each time you add a new source file in "src" directory or in "lib/src" directory, you must enter the following commands :
cd unsio/template/uns_devel/build cmake .. make