Closed tomeichlersmith closed 3 years ago
Long ago (in a galaxy far far away), we needed to save space on our computers because our hard-drives were very small. In those days, reducing code copying was a necessity and so "linking" was invented. This allows a program or a library to refer to a "library" of code and use its code by "linking" to it after compiling. Refering to a library can be done in two ways.
Dynamic is more common so that two people can have a different directory structure but still use the same programs.
This whole explanation only exists to point out that you have to tell the computer where to find the libraries you want your program to link to.
In the terminal I'm used to using bash
, this is done via a set of environment variables that are lists of directories separated by colons :
.
The useful environment variables I've found are in the table below.
Variable | Purpose |
---|---|
PATH |
Directories to search when trying to find a command to run on the command line |
LD_LIBRARY_PATH |
Directories to search when trying to find a library to link |
CMAKE_PREFIX_PATH |
Directories to search when trying to find a package in CMake |
The environment script I've written assumes that your directory structure looks like this:
- base
- dealii-9.3.1
- install
- eigen-3.4.0
- install
- hdf5-1.12.0
- install
- HighFive
- install
- maier-saupe-lc-hydrodynamics
- install
where the install
directory is alongside the source code just for ease.
Then you can define the necessary environment variables using
source env.sh <full-path-to-base>
This may not be the way you want to work, but I'm hoping the environment script will give you the necessary tools to modify it to your own workflow.
I noticed that you are using Boost's unit test framework to write some tests. It's good that you are thinking about writing tests.
Boost's unit test framework is mainly geared towards testing various aspects of a library. Another testing framework comes with CMake which may work better for you because it is focused on testing the behavior of executables. You can go with either or both, just wanted to offer another option.
(will edit/comment further later tonight after we meet)
Goals