VRPN: Undefined references and linking issue

Working with OpenViBE signal processing scenarios and doing scenario/BCI design
Post Reply
fisherconanan
Posts: 3
Joined: Mon Oct 07, 2019 8:00 pm

VRPN: Undefined references and linking issue

Post 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?

Thibaut
Posts: 264
Joined: Wed Oct 31, 2018 9:14 am

Re: VRPN: Undefined references and linking issue

Post by Thibaut »

You have run the command install dependencies ? in the good platform you compile (ie in x64 the folder is called dependencies_x64)

fisherconanan
Posts: 3
Joined: Mon Oct 07, 2019 8:00 pm

Re: VRPN: Undefined references and linking issue

Post 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.

Thibaut
Posts: 264
Joined: Wed Oct 31, 2018 9:14 am

Re: VRPN: Undefined references and linking issue

Post 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.

Post Reply