dpp icon indicating copy to clipboard operation
dpp copied to clipboard

Problem processing X11 include files

Open russel opened this issue 4 years ago • 0 comments

I thought I would tackle the problem introduced by Murilo Miranda at https://www.facebook.com/groups/ProgrammingInDlang/?multi_permalinks=1196551170736883%2C1196081524117181%2C1195634324161901%2C1195580357500631&notif_id=1588807395656256&notif_t=group_activity&ref=notif

I created x_stuff.dpp:

#include <X11/extensions/XTest.h>

int main() {
    /* Fake the pointer movement to new relative position */
    Display dpy = XOpenDisplay(NULL);
    XTestFakeMotionEvent(dpy, 0, 300, 300, CurrentTime);
    XSync(dpy, 0);
    return 0;
}

and ran the command "d++ x_stuff.dpp" which resulted in:

Error: Could not execute `dmd ./x_stuff.d -ofx_stuff`:
./x_stuff.d(1231): Error: { } expected following `struct` declaration
./x_stuff.d(1231): Error: { } expected following `struct` declaration
./x_stuff.d(1231): Error: declaration expected, not `(`
./x_stuff.d(10621): Error: unrecognized declaration

Line 1231 is:

struct struct (anonymous at /usr/include/X11/Xlib.h:493:9)

and 10621 is:

}

russel avatar May 08 '20 10:05 russel