Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error when include "MSR_NuiApi.h" in project [Kinect,OpenCV]
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rmitrun
    wrote on last edited by
    #1

    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)!

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      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.

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved