Winapi.inc compilation fails END INCLUDE OMIT SECTION COMPILE PRAGMA GROUP

Hey… new C9 user here … want to refresh an old app with a new view and want to add some of things like auto windows size… i was able to add printf.inc but when i try to add winapi.inc i get this error in compilation:

Expected: <ID> <LINEBREAK> ; END INCLUDE OMIT SECTION COMPILE PRAGMA MODULE

and it shows error on top of svapi.inc (included by winapi.inc):

 omit('EndDefine',_WINAPI_)
_WINAPI_  equate(1)

And here:

  INCLUDE('svapi.inc'), ONCE

  MAP
    MODULE('winapi.clw')
      COLORREF::FromRGB(BYTE r, BYTE g, BYTE b), COLORREF
      COLORREF::FromClarion(LONG pClaColor), COLORREF
      COLORREF::ToRGB(COLORREF pWinColor, *BYTE r, *BYTE g, *BYTE b)
      COLORREF::ToClarion(COLORREF pWinColor), LONG
    END
  END

and same error above?

Appreciate all the help for someone just finding the tools and ropes.

Did it work before you made your changes?

Where have you included winapi? Unlike printf winapi must be included outside of a MAP clause.

Hi Mike,
Thanks for picking this up quickly. I did download directly off github but it seems to me that there’s something it does not like. (I did go to Clarion 11 in the meantime with exactly the same behavior)

In the Image Selector repository there is a DropTarget project that uses winapi and printf, does it compile?

It does! Thank you! (In the meantime since i created question - i upgraded from C9 to C11 - previously i could not compile them). I’ll figure out what’s wrong on my side.