Fixed the code, added linked libraries