Issue with VRPN-Listener.cpp

NatNet, VRPN, TrackD, and Plugins
Post Reply
Nemesis
Posts: 16
Joined: Thu Feb 07, 2013 11:00 am

Issue with VRPN-Listener.cpp

Post by Nemesis »

Hey,

I am starting right from scratch. I looked at the tutorial for vrpn-listener on the website, and I'm attempting to compile and run that program on Windows.

  • 1. I downloaded VRPN and I just built vrpn_test (VRPN website mentioned that this will build other files as well).
  • 2. I then downloaded the VRPN-Listener code. As per the tutorial, I "included" the vrpn folder. To added the directory for "Linker" I couldn't find any sub-folder named "Release". So I instead added the folder "Debug". I think this is where I am wrong.

I tried running the above but I keep getting the same errors -

Code: Select all

 1>VRPN-Listener.obj : error LNK2019: unresolved external symbol "public: __thiscall vrpn_Tracker_Remote::vrpn_Tracker_Remote(char const *,class vrpn_Connection *)" (??0vrpn_Tracker_Remote@@QAE@PBDPAVvrpn_Connection@@@Z) referenced in function _main
1>VRPN-Listener.obj : error LNK2019: unresolved external symbol "class vrpn_Connection * __cdecl vrpn_get_connection_by_name(char const *,char const *,char const *,char const *,char const *,char const *,bool)" (?vrpn_get_connection_by_name@@YAPAVvrpn_Connection@@PBD00000_N@Z) referenced in function _main
1>C:\Users\Sahil Juneja\Downloads\ARoS\VRPN-Tracking-v3\Debug\VRPN-Listener.exe : fatal error LNK1120: 2 unresolved externals
My other post is about trying to use this very code in Linux (Ubuntu), but since I couldn't manage to get that to work, I am trying it out on Windows just to start off. Can anyone let me know where I might be making a mistake? Thank you.
NaturalPoint-Dustin
Posts: 609
Joined: Tue Mar 19, 2013 5:03 pm

Re: Issue with VRPN-Listener.cpp

Post by NaturalPoint-Dustin »

Hi sj22, I will do some research on this for you.
Dustin
Technical Support Engineer
OptiTrack | TrackIR | SmartNav
NaturalPoint-Dustin
Posts: 609
Joined: Tue Mar 19, 2013 5:03 pm

Re: Issue with VRPN-Listener.cpp

Post by NaturalPoint-Dustin »

Is the tutorial you are referring to located here:

http://www.naturalpoint.com/optitrack/p ... rials.html
Dustin
Technical Support Engineer
OptiTrack | TrackIR | SmartNav
Nemesis
Posts: 16
Joined: Thu Feb 07, 2013 11:00 am

Re: Issue with VRPN-Listener.cpp

Post by Nemesis »

Yes. The VRPN Streaming Tutorial
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: Issue with VRPN-Listener.cpp

Post by beckdo »

Ok, so if you're running in Windows and you're using the Debug target in Visual Studio, you'll need to also make sure to build VRPN's Debug Target. Same goes for the Release Target.

For the Debug Target of the VRPN sample, you need to link against either the Debug or Release targets of the VRPN library. To keep it simple Debug->Debug and Release->Release.

If you don't link the sample against one of the VRPN targets, then you don't have the symbols you need, thus the error you're getting.

I'm not sure how much experience you have with Visual Studio, but make sure in the Linker -> Input -> Additional Dependencies you type in vrpn.lib and shown in the video. That's a key part of linking against a library. If you don't do that, you get linker errors like you have.
Nemesis
Posts: 16
Joined: Thu Feb 07, 2013 11:00 am

Re: Issue with VRPN-Listener.cpp

Post by Nemesis »

Thank you Doug!

I think it was the addition of "vrpn.lib" that you mentioned that made it to work. It's building and it is giving me no response as an output (when the program runs) because I am not connected to the network on which optitrack is connected here. I will inform here once I cross-check on the same network and receive the actual data. Thank you once again!

Now I have to try and figure this out on Ubuntu as well. Any suggestions for that? (If I find something that works for that I will post that here as well)
Nemesis
Posts: 16
Joined: Thu Feb 07, 2013 11:00 am

Re: Issue with VRPN-Listener.cpp

Post by Nemesis »

Tried running it on the same network to which the optitrack software is connected. Again got a "VRPN Error" when I run it mentioning "No Response from server".
Post Reply