Hello!
I answered someone's question on the "Get Help" forum but figured it's a good idea to have a dedicated bug thread as well.
The issue is pd_api.h
in the C SDK declares eventHandler
as
// main entry point defined in game code, called for the above events
int eventHandler(PlaydateAPI* playdate, PDSystemEvent event, uint32_t arg);
whereas the examples all define eventHandler
as
#ifdef _WINDLL
__declspec(dllexport)
#endif
int eventHandler(PlaydateAPI* playdate, PDSystemEvent event, uint32_t arg);
Trying to build as-is results in
Error C2375 'eventHandler': redefinition; different linkage hello_world C:\PlaydateSDK\C_API\Examples\Hello World\src\main.c 21
Can the declaration in pd_api.h
be updated to include the Windows specific export?
#ifdef _WINDLL
__declspec(dllexport)
#endif
Thanks!
Owen