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();
}
@
i get error:
@undefined reference to 'vrpn_Analog_Remote::vrpn_Analog_Remote(char const*, vrpn Connection*)'@