On 17 Mar 2014 01:25, "Walter Bright" <newshou...@digitalmars.com> wrote: > > 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.
If I recall, he was saying that you must pass -fversion=CAIRO_HAS_PNG_SUPPORT to every file that imports it was the problem, because you want PNG support, not stubs. It's more an example where you need a build system in place for a simple hello world in cairoD if you don't want to be typing too much just to get your test program built. :)