[JdeRobot] Linking executable problem - Undefined reference

samartin samuel.martinm at gmail.com
Wed Jun 15 04:25:04 CEST 2016


Hi!

I am trying to add a new connection in a component using parallelIce
pointcloudClient but I am getting this error:

[ 71%] Building CXX object
src/stable/components/mapper3Drgbd/CMakeFiles/mapper3Drgbd.dir/mapper3Drgbd.cpp.o
Linking CXX executable mapper3Drgbd
CMakeFiles/mapper3Drgbd.dir/mapper3Drgbd.cpp.o: En la funciĆ³n `main':
/home/samuel/JdeRobotReal/src/stable/components/mapper3Drgbd/mapper3Drgbd.cpp:247:
referencia a
`jderobot::pointcloudClient::pointcloudClient(IceInternal::Handle<Ice::Communicator>,
std::string)' sin definir
/home/samuel/JdeRobotReal/src/stable/components/mapper3Drgbd/mapper3Drgbd.cpp:326:
referencia a
`jderobot::pointcloudClient::getData(std::vector<jderobot::RGBPoint,
std::allocator<jderobot::RGBPoint> >&, bool)' sin definir
collect2: error: ld returned 1 exit status
make[2]: *** [src/stable/components/mapper3Drgbd/mapper3Drgbd] Error 1
make[1]: ***
[src/stable/components/mapper3Drgbd/CMakeFiles/mapper3Drgbd.dir/all] Error 2
make: *** [all] Error 2

Lines 247-255:

	pointCloudClient = new jderobot::pointcloudClient(ic, prefix +
".PointCloud.");
	if ( pointCloudClient != NULL )
	{
		pointCloudTc = pointCloudClient->start();
	}
	else
	{
		throw prefix + ": failed to load Pose3D";
	}

Lines 325-327:

	if ( pointCloudClient != NULL )
	{
		pointCloudClient->getData(cloud);
	}

I have implemented the change like rgbdViewer does, because that component
also uses pointcloudClient, and I am successfully using parallelIce in this
component with cameraClient. It may be a  link order problem
<http://stackoverflow.com/questions/1095298/gcc-c-linker-errors-undefined-reference-to-vtable-for-xxx-undefined-refere>  
but I am not very sure of how to fix it right now. I would appreciate any
ideas.

Thanks in advance!
Samuel



--
View this message in context: http://jderobot-developer-list.2315034.n4.nabble.com/Linking-executable-problem-Undefined-reference-tp4643050.html
Sent from the Jderobot Developer List mailing list archive at Nabble.com.


More information about the Jde-developers mailing list