Page 1 of 1

VRPN: Undefined references and linking issue

Posted: Wed Oct 16, 2019 2:26 am
by fisherconanan
Following the tutorial at http://openvibe.inria.fr/vrpn-tutorial- ... plication/

It says to place the C++ file in "dependencies/vrpn/include", however inside my /dependencies folder I only have the following folders:
- arch
- gtest-build
- include
- lib
- libgtest
- test-input

I decided to put the file in /dependencies/arch/vrpn/ because there are other vrpn .c and .h files in there.
I compile file with the following command:

$ g++ -L/usr/local/openvibe-2.2.0-src/dependencies/lib -lvrpn -lvrpnserver VRPNtest.cpp -o vrpntest

This returns the following errors:

/tmp/cccYOzJT.o: In function `main':
VRPNtest.cpp:(.text+0x12f): undefined reference to `vrpn_Button_Remote::vrpn_Button_Remote(char const*, vrpn_Connection*)'
VRPNtest.cpp:(.text+0x172): undefined reference to `vrpn_Analog_Remote::vrpn_Analog_Remote(char const*, vrpn_Connection*)'
collect2: error: ld returned 1 exit status

I see other that have had this issue before and it is always a linking issue, however I feel like I am linking the libvrpn.a and libvrpnserver.a correctly.
I think my problem resides in the fact that I never had a dependencies/vrpn/ directory to begin with.
Has anyone else experienced this issue?

Re: VRPN: Undefined references and linking issue

Posted: Wed Oct 16, 2019 7:14 am
by Thibaut
You have run the command install dependencies ? in the good platform you compile (ie in x64 the folder is called dependencies_x64)

Re: VRPN: Undefined references and linking issue

Posted: Wed Oct 16, 2019 6:03 pm
by fisherconanan
Thibaut wrote:You have run the command install dependencies ? in the good platform you compile (ie in x64 the folder is called dependencies_x64)
Yes, install_dependencies.sh was executed as I am on Ubuntu 16.04.

Re: VRPN: Undefined references and linking issue

Posted: Tue Oct 22, 2019 1:44 pm
by Thibaut
Hum, check the code of the

Code: Select all

CBoxAlgorithmVRPNButtonClient 
that uses the VRPN.. Or The demo applications. Sorry I don't use vrpn yet. And this tutorial is for a very old version of OpenViBE.