Error when include "MSR_NuiApi.h" in project [Kinect,OpenCV]



  • i want get image from Kinect.
    sorry my poor english. I'm Thai.

    .pro
    @
    QT += core gui

    TARGET = Hokuyo_1
    TEMPLATE = app

    SOURCES += main.cpp
    mainwindow.cpp
    serial.cpp
    hokuyo.cpp

    HEADERS += mainwindow.h
    serial.h
    hokuyo.h

    FORMS += mainwindow.ui

    INCLUDEPATH += "C:\Program Files\OpenCV\cv\include" "C:\Program Files\OpenCV\cvaux\include" "C:\Program Files\OpenCV\cxcore\include" "C:\Program Files\OpenCV\ml\include" "C:\Program Files\OpenCV\otherlibs\highgui" "C:\Program Files\Microsoft Research KinectSDK\inc"
    LIBS += -L"C:\Program Files\OpenCV\lib" -lcv -lcvaux -lhighgui -lcxcore
    HEADERS += "C:\Program Files\OpenCV\cv\include" "C:\Program Files\OpenCV\cvaux\include" "C:\Program Files\OpenCV\cxcore\include" "C:\Program Files\OpenCV\ml\include" "C:\Program Files\OpenCV\otherlibs\highgui" "C:\Program Files\Microsoft Research KinectSDK\inc"
    @

    .h file
    @#ifndef MAINWINDOW_H
    #define MAINWINDOW_H

    #include <windows.h>
    #include "MSR_NuiApi.h"

    #include "cv.h"
    #include "cvaux.h"
    #include "cxcore.h"
    #include "highgui.h"

    #include <QMainWindow>
    #include <QWidget>
    #include <QPainter>
    #include <QThread>
    #include <QTimer>

    using namespace std;

    // channel indices
    #define BLUE_CH 0
    #define GREEN_CH 1
    #define RED_CH 2

    namespace Ui
    {
    class MainWindow;
    }

    class MainWindow : public QMainWindow
    {
    Q_OBJECT

    public : explicit MainWindow(QWidget *parent = 0);
             ~MainWindow();
    
    private slots  : void on_sendButton_clicked();
                     void on_portBox_currentIndexChanged(int index);
                     void on_openButton_clicked();
                     void on_readButton_clicked();
                     void th_send();
                     void read();
    
                     void on_showButton_clicked();
    

    protected : QTimer *_timer;
    private : Ui::MainWindow *ui;
    };

    #endif // MAINWINDOW_H
    @

    !http://dl.dropbox.com/u/36273063/error_nui.PNG(This pic)!



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.