Final by default?

Iain Buclaw ibuclaw at gdcproject.org
Mon Mar 17 00:39:48 PDT 2014


On 17 Mar 2014 01:25, "Walter Bright" <newshound2 at 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. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140317/34213283/attachment.html>


More information about the Digitalmars-d mailing list