I have slayed the mighty makefile issues by the power of libstdc++. also ppm writing works