I have to write a programm that should afterwards run on a supercomputer, so I got the hint I should link my libraries statically.
The problem is when I link
g++ -o calcrank -llinbox -lgivaro -lgmp -lntl -static -static-libstdc++ -static-libgcc calcrank.cpp
/usr/bin/ld: cannot find -llinbox
/usr/bin/ld: cannot find -lgivaro
/usr/bin/ld: cannot find -lgmp
/usr/bin/ld: cannot find -lntl
collect2: error: ld returned 1 exit status
There are no easy ways, as far as I know.
There are some tools for "static linking" shared libraries:
You should probably ask about this, maybe you can bring shared libraries along and set the environment variable
LD_LIBRARY_PATH to point to your shared libraries directory in a script before running your program.
As far as I remember Statifier didn't work for me. Ermine unlicensed gives some warnings and a 30-day limitation message, probably. So to distribute my thing across Linux systems with no admin rights I collected all needed shared libraries into a subdirectory, made a script that sets the env variable and launches my executable. And distributed it all as a zip.