Improvements for Windows developers

I've fixed several linker warnings and possible linker errors when using inline functions.
Also integrated the debug output directly in Visual Studio instead of opening the console, it's disabled by default and can be enabled in the cmake config.