jhu-cisst / cisst-saw

Meta project to compile cisst libraries along with SAW components
16 stars 9 forks source link

igtl::Socket::Receive error on build #5

Open dusevitch opened 2 years ago

dusevitch commented 2 years ago

I keep getting the following errors when running catkin build --summary for every instance that the Receive function is run (i've only included 2 errors shown here).

I wasn't seeing the 2 parameter option for Receive(void* param1, igtl_uint64 param2) in the source code, as it seems to be complaining about here, maybe there's some kind of virtual overload function missing? I'm guessing it's probably just something on my machine that isn't quite installed correctly. I'm running Ubuntu 18.04 with ROS melodic.

How do I fix this?

Errors     << saw_open_igt_link_utilities:make /home/david/ws/catkin_ws/logs/saw_open_igt_link_utilities/build.make.000.log
/home/dusevitch/ws/catkin_ws/src/cisst-saw/sawOpenIGTLink/utilities/igtl_receive.cxx: In function ‘int main(int, char**)’:
/home/dusevitch/ws/catkin_ws/src/cisst-saw/sawOpenIGTLink/utilities/igtl_receive.cxx:105:82: error: no matching function for call to ‘igtl::ClientSocket::Receive(void*, igtl_uint64)’
     int r = socket->Receive(headerMsg->GetPackPointer(), headerMsg->GetPackSize());
                                                                                  ^
In file included from /usr/local/include/igtl/igtlClientSocket.h:33:0,
                 from /home/dusevitch/ws/catkin_ws/src/cisst-saw/sawOpenIGTLink/utilities/igtl_receive.cxx:26:
/usr/local/include/igtl/igtlSocket.h:92:14: note: candidate: igtlUint64 igtl::Socket::Receive(void*, igtlUint64, bool&, int)
   igtlUint64 Receive(void* data, igtlUint64 length, bool& timeout, int readFully=1);
              ^~~~~~~
/usr/local/include/igtl/igtlSocket.h:92:14: note:   candidate expects 4 arguments, 2 provided
/home/dusevitch/ws/catkin_ws/src/cisst-saw/sawOpenIGTLink/utilities/igtl_receive.cxx: In function ‘int ReceiveTransform(igtl::ClientSocket::Pointer&, igtl::MessageBase::Pointer&)’:
/home/dusevitch/ws/catkin_ws/src/cisst-saw/sawOpenIGTLink/utilities/igtl_receive.cxx:218:78: error: no matching function for call to ‘igtl::ClientSocket::Receive(void*, igtl_uint64)’
   socket->Receive(transMsg->GetPackBodyPointer(), transMsg->GetPackBodySize());
                                                                              ^
In file included from /usr/local/include/igtl/igtlClientSocket.h:33:0,
                 from /home/dusevitch/ws/catkin_ws/src/cisst-saw/sawOpenIGTLink/utilities/igtl_receive.cxx:26:
/usr/local/include/igtl/igtlSocket.h:92:14: note: candidate: igtlUint64 igtl::Socket::Receive(void*, igtlUint64, bool&, int)
   igtlUint64 Receive(void* data, igtlUint64 length, bool& timeout, int readFully=1);
              ^~~~~~~
adeguet1 commented 2 years ago

This is not strictly related to cisst-saw but sawOpenIGTLink (https://github.com/jhu-saw/sawOpenIGTLink). I pushed some changes on the devel branch of sawOpenIGTLink, please pull the latest code and test it.