Fix main.cpp compile errors. Link still fails