On Thursday, 30 October 2014 at 18:43:21 UTC, Laeeth Isharc wrote:
The code below works fine if you remove the extern(C). But I get the error "functionpointertest.d(6): Error: basic type expected, not extern" with the code as it is.

How do I use alias with extern ?
[...]
alias Callback= extern(C) void function(int);

Compiles as is with dmd 2.066. For 2.065 and older you have to
put extern(C) in front of "alias":

extern(C) alias Callback= void function(int);

Reply via email to