What do you mean with:
5. move everything to galileo
Do you mean that you are moving the files to the Galileo? Or are you moving the image with the compiled program?
Sorry for the short, ambiguous description.
I meant, after step 2, I have a usable image with 3G file system, and is able to boot the Galileo from the image on a micro SD card.
And after step 4, I have all the libraries, headers needed to run my application binaries.
In step 5, I use sct to move everything (libraries, headers, applications) to Galileo.
basically libcryptopp's makefile appends
environment-setup-i586-poky-linux-uclibc. After deleting some lines, the compiled libary should work correctly.