Linux compatibility

I was unable to compile on Linux as the linker arguments have to be last. This version compiles cleanly on Linux. I did also fix a type and added a .gitignore file, so that Git does not complain about the compiled files.