Compiles and links on Linux but does not work. Unknown whether it links on Windows