tboox / tbox

🎁 A glib-like multi-platform c library
https://docs.tboox.org
Apache License 2.0
4.89k stars 725 forks source link

Fix the missing of CancelIoEx #229

Closed da-liii closed 1 year ago

da-liii commented 1 year ago

Fix #228, here is the error:

error: @programdir\modules\private\async\runjobs.lua:256: @programdir\modules\private\action\build\object.lua:91: @programdir\modules\core\tools\gcc.lua:805: In file included from src\tbox\platform\fwatcher.c:37:
src\tbox\platform\windows/fwatcher_iocp.c: In function 'tb_fwatcher_item_free':
src\tbox\platform\windows/fwatcher_iocp.c:81:9: error: implicit declaration of function 'CancelIoEx'; did you mean 'CancelIo'? [-Werror=implicit-function-declaration]
         CancelIoEx(watchitem->handle, &watchitem->overlapped);
         ^~~~~~~~~~
         CancelIo
da-liii commented 1 year ago

The dev branch works fine. And it might be a good idea to include "prefix.h" explicitly.