On 3/15/2014 6:44 AM, Johannes Pfau wrote: > Then in cairo.d > version(CAIRO_HAS_PNG_SUPPORT) > { > extern(C) int cairo_save_png(char* x); > void savePNG(string x){cairo_save_png(toStringz(x))}; > } try adding: else { void savePNG(string x) { } } and then your users can just call savePNG without checking the version.