When everything is installed properly, copy the contents of doc/examples to some other directory and run
g++ -o linear_example linear_example.cpp $(pkg-config --cflags --libs myFitter)
If you don't use the GNU compiler (but why wouldn't you?) replace g++
by whatever your compiler is called. The command
pkg-config --cflags --libs myFitter prints out the flags needed
to link your program to myFitter, and the $()
construct
substitutes the output on the command line. When you write bigger programs
you'll want to do compiling and linking in two steps. Then use
pkg-config --cflags myFitter for compilation and
pkg-config --libs myFitter for linking.
If everything worked, you now have an executable called linear_example in your working directory. Try to run it. It fits a simple model to some data and computes the p-value in two different ways. It takes a couple of minutes to run. To get a first idea of how to implement your own models and do your own fits, have a look at the source files linear_example.cpp and linearmodel.hpp. They have lots of comments that explain what's going on.