Acfboy commented on issue #18566: URL: https://github.com/apache/nuttx/issues/18566#issuecomment-4693270326
Hi, @ghaerr , I found something went wrong when I tried to use mwin in nuttx. https://github.com/ghaerr/microwindows/blob/6db9964a37a70ce8ea99f4021dd80c160c28eb58/src/include/windows.h#L22-L26 In `windows.h`, we include `wingdi.h` before `winres.h`, and we define the macro ERROR there. https://github.com/ghaerr/microwindows/blob/6db9964a37a70ce8ea99f4021dd80c160c28eb58/src/include/wingdi.h#L408 In `winres.h`, we include `stdio.h`. However, in `stdio.h`, NuttX includes `sys/types.h`, and an enum containing ERROR is defined there. https://github.com/apache/nuttx/blob/0b5bf6c2c59579b83d0e93356b1977620f227170/include/sys/types.h#L320-L324 This causes a compilation error. Since ERROR is a very common name, leaking this macro might easily cause conflicts. I'm not sure what the best way to fix this permanently is. Currently, I'm using a temporary workaround that lifts `winres.h` in front of `wingdi.h` (using a complex awk command in the Makefile). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
