First of all, it would be nice to also have a question, about what you want to know, so we have to guess.
But I will try:
You get warnigns and errors from MSR_NuiApi.h, and that is your problem, right?
From the errors you get, I assume, that file is written for MSVS (dllimport, pragma warning, are MS tool chain specific things) but you compile your project with mingw (which does not know these things).
Also In, Deref_out etc are also MS specifica.