Correct the application code.
Remove main.cpp from the library.