testcard.c not running. can you please explain the issue?

25 views
Skip to first unread message

Ahmad Iqbal

unread,
Dec 20, 2015, 5:42:42 AM12/20/15
to Simple 2D
hi,
the following errors generated, while running the test. please check the attachment.

testcard.c:43:23: error: no member named 'mouse' in 'struct Window'

  pointer.x = window->mouse.x;

              ~~~~~~  ^

testcard.c:44:23: error: no member named 'mouse' in 'struct Window'

  pointer.y = window->mouse.y;

              ~~~~~~  ^

testcard.c:203:81: error: use of undeclared identifier 'S2D_RESIZABLE'

  window = S2D_CreateWindow("Simple 2D – Testcard", 600, 500, update, render, S2D_RESIZABLE);

                                                                              ^

testcard.c:207:11: error: no member named 'on_mouse' in 'struct Window'

  window->on_mouse = on_mouse;

  ~~~~~~  ^

testcard.c:208:11: error: no member named 'on_controller' in 'struct Window'

  window->on_controller = on_controller;

  ~~~~~~  ^

testcard.c:239:3: warning: implicit declaration of function 'S2D_Close' is invalid in C99 [-Wimplicit-function-declaration]

  S2D_Close(window);

  ^

1 warning and 5 errors generated.


Thanks,
ahmad.



Screen Shot 2015-12-20 at 3.40.24 pm.png

Tom Black

unread,
Dec 20, 2015, 9:53:56 PM12/20/15
to simp...@googlegroups.com
Hi Ahmad,

The version you installed, probably from Homebrew, didn't reflect some recent API changes. I just pushed a new release (v0.0.4), so could you "brew update" and then "brew upgrade simple2d" and let me know if it works? I'll try to release more often when changing the API, so hopefully others won't run into the same issues.

Thanks,
Tom
Reply all
Reply to author
Forward
0 new messages