Since shogun is a shared library, it's doesn't make sense to have a main() function inside the source tree. You should probably rewrite this as a unit test and put it with the other shogun unit tests.