fixed for windows. Added linking libraries (Won gets the credit!). Fixed string convertion errors