none
errors occured when include the Kinect SDK header file NuiApi.h in a new project RRS feed

  • Question

  • HELLO,everyone, i am doing the development of Kinect SDK, i got problems as i mentioned in the title. The project is created by VS2010 and the VC++ directories is configured well.  what is the problem with that, Could you help me get this problem solved? Thanks!

    Thursday, February 9, 2012 9:39 AM

Answers

  • You didn't specify which errors you got, so that makes diagnosis a little difficult.

    Please note that NuiApi.h expects windows.h to be included first. If you're already including windows.h ahead of NuiApi.h and still seeing errors, please post the specific error messages here.

    John
    K4W Dev

    • Marked as answer by Kobegan Friday, February 10, 2012 9:48 AM
    • Unmarked as answer by Kobegan Friday, February 10, 2012 9:48 AM
    • Marked as answer by Kobegan Friday, February 10, 2012 9:48 AM
    Thursday, February 9, 2012 6:46 PM

All replies

  • You didn't specify which errors you got, so that makes diagnosis a little difficult.

    Please note that NuiApi.h expects windows.h to be included first. If you're already including windows.h ahead of NuiApi.h and still seeing errors, please post the specific error messages here.

    John
    K4W Dev

    • Marked as answer by Kobegan Friday, February 10, 2012 9:48 AM
    • Unmarked as answer by Kobegan Friday, February 10, 2012 9:48 AM
    • Marked as answer by Kobegan Friday, February 10, 2012 9:48 AM
    Thursday, February 9, 2012 6:46 PM
  • What is the error? Do the sample C++ applications build and compile for you?


    Thursday, February 9, 2012 6:50 PM
  • Hi, as you said , i included the windows.h first and got the problem solved. Thanks very much!

    Gan

    Friday, February 10, 2012 9:51 AM
  • i got it solved, thanks  for your answer!

    Gan

    Friday, February 10, 2012 9:52 AM
  • Hi, All

    I am trying to combine my kinect class into another program, as long as I put : #include "NuiApi.h" into the code, errors below appear:

    1>c:\program files\microsoft sdks\kinect\v1.0\inc\nuisensor.h(46): error C2146: syntax error : missing ';' before identifier 'INuiAudioBeam'
    1>c:\program files\microsoft sdks\kinect\v1.0\inc\nuisensor.h(46): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft sdks\kinect\v1.0\inc\nuisensor.h(46): error C2146: syntax error : missing ';' before identifier 'INuiAudioBeam'
    1>c:\program files\microsoft sdks\kinect\v1.0\inc\nuisensor.h(46): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft sdks\kinect\v1.0\inc\nuisensor.h(46): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft sdks\kinect\v1.0\inc\nuisensor.h(46): error C2086: 'int INuiAudioBeam' : redefinition
    1>          c:\program files\microsoft sdks\kinect\v1.0\inc\nuisensor.h(46) : see declaration of 'INuiAudioBeam'

    ...

    ...  (long errors list)

    ...

    Any idea for this issue?? Many thanks

    p.s. I have added #include <windows.h> before #include "NuiApi.h", no difference.

    • Edited by zipmee Wednesday, February 22, 2012 11:31 AM
    Wednesday, February 22, 2012 11:30 AM
  • Same problem here. I have the include and library directories specified in my VS2010 project settings (and windows.h included in the header before NuiApi.h) but I'm still unable to compile.
    Thursday, February 23, 2012 10:46 PM
  • How to solve that problom?
    Saturday, June 15, 2013 4:11 AM