I have answered a very similar question to this one in C++ Creating Release Version. I suggest you to look at it and see it helps you.
The thread is for Edison, nevertheless the principle is the same with Galileo. So basically you will have to use system services.
I have followed your guide and i successully make my project run every i reboot the board but some issues have occured.
My project run without problem with Eclipse IDE but when i create the service as u guide, the process return result as a error.I realize that the program can not read my xml file from sdcard.
But its ok when i run if Eclipse IDE.Here is the location i save xml file and executable file
Edited:After change to full path, everything is ok.Thank you so much, Peter.