Download STK and put it into a working directory of your choice. In the following notes, it is assumed that the STK distribution is located in the ˜/Desktop/tmp/stk/ directory and that a static library has been compiled in the src subdirectory. This can be done by typing ./configure and then make from within the stk/ directory (using a Terminal window).
Under these conditions, we can compile a simple C++ program file myprogram.cpp in the working directory (˜/Desktop/tmp/) and link against the STK library as follows (further libraries may be necessary depending on the particular program):
In the previous compile statement, the -o flag specifies a name for the resulting binary (which will be called myprogram in this example). The -I flag specfies a directory in which to search for header files, the -L flag specifies a directory in which to search for libraries, and the -l flag specifies a library name to link to (stk in this example).
On a computer running Windows, the same approach as outlined above can be used with the MinGW
compiler and the MSYS
shell. Another, perhaps easier option, may be to use the Windows Subsystem for Linux (WSL), though I have not tried that yet.