Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Include VRPN server to QT app
Forum Updated to NodeBB v4.3 + New Features

Include VRPN server to QT app

Scheduled Pinned Locked Moved 3rd Party Software
3 Posts 2 Posters 1.7k 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.
  • S Offline
    S Offline
    Sk1X1
    wrote on last edited by
    #1

    Hey,
    I need to use VRPN server in my app. I'm creating "QT Widget Application". I try to use code from this tutorial "VRPN use tutorial":http://www.vrgeeks.org/vrpn/tutorial---use-vrpn#TOC-Introduction, but I get too many errors. I think, I do mistake in including external VRPN .h and .c files, because when I try to run this code in Visual Studio, I get no error.

    Is here someone, who try to run QT app with VRPN server files?
    Thanks for all replies

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What errors are you getting ? Also can you show your pro file ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sk1X1
        wrote on last edited by
        #3

        My .pro file:
        @#-------------------------------------------------

        Project created by QtCreator 2014-04-14T14:53:36

        #-------------------------------------------------

        QT += core

        QT -= gui

        TARGET = vrpnServer
        CONFIG += console
        CONFIG -= app_bundle

        TEMPLATE = app

        SOURCES += main.cpp

        CONFIG(release, debug|release): LIBS += -L"D:/ZCU/QT/vrpnServer" -lvrpn

        INCLUDEPATH += $$PWD/
        DEPENDPATH += $$PWD/

        LIBS += -L$$PWD/ -lvrpn

        INCLUDEPATH += $$PWD/VRPN
        DEPENDPATH += $$PWD/VRPN

        @

        and when I try to run this code:
        @#include <QCoreApplication>
        #include<iostream>

        #include <vrpn_Analog.h>

        using namespace std;

        void VRPN_CALLBACK handle_analog( void* userData, const vrpn_ANALOGCB a )
        {
        int nbChannels = a.num_channel;

        cout << "Analog : ";

        for( int i=0; i < a.num_channel; i++ )
        {
        cout << a.channel[i] << " ";
        }

        cout << endl;
        }

        int main(int argc, char *argv[])
        {
        QCoreApplication a(argc, argv);

        vrpn_Analog_Remote *vrpnAnalog = new vrpn_Analog_Remote("Mouse0@localhost");
        vrpnAnalog->register_change_handler( 0, handle_analog );
        
        return a.exec&#40;&#41;;
        

        }
        @

        i get error:
        @undefined reference to 'vrpn_Analog_Remote::vrpn_Analog_Remote(char const*, vrpn Connection*)'@

        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