robotology / idyntree-yarp-tools

Tools based on the iDynTree library that depend on YARP.
GNU Lesser General Public License v2.1
6 stars 2 forks source link

Add CI with conda dependencies and fix Windows compilation #11

Closed traversaro closed 3 years ago

traversaro commented 3 years ago
S-Dafarra commented 3 years ago

One of the CI errors (in Windows) is because I used M_PI in https://github.com/robotology/idyntree-yarp-tools/blob/1e1031ab1c5e1941f5f4021f42de513fa05c3245/src/modules/idyntree-yarp-visualizer/Visualizer.cpp#L882-L891

traversaro commented 3 years ago

One of the CI errors (in Windows) is because I used M_PI in

Thanks, I added a add_definitions call in the root src as this repo does not install libraries, and M_PI is quite used also in other tools that I am going to add.

traversaro commented 3 years ago

Windows CI is failing with error:

D:\a\idyntree-yarp-tools\idyntree-yarp-tools\src\modules\idyntree-yarp-visualizer\RobotConnectors.cpp(360,89): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data [D:\a\idyntree-yarp-tools\idyntree-yarp-tools\build\src\modules\idyntree-yarp-visualizer\idyntree-yarp-visualizer.vcxproj]
  VisualizerCommands.cpp
  Generating Code...
YARP_dev.lib(YARP_dev.dll) : error LNK2005: "public: __cdecl yarp::dev::impl::jointData::jointData(void)" (??0jointData@impl@dev@yarp@@QEAA@XZ) already defined in readonlyremotecontrolboard.lib(jointData.obj) [D:\a\idyntree-yarp-tools\idyntree-yarp-tools\build\src\modules\idyntree-yarp-visualizer\idyntree-yarp-visualizer.vcxproj]
     Creating library D:/a/idyntree-yarp-tools/idyntree-yarp-tools/build/lib/Release/idyntree-yarp-visualizer.lib and object D:/a/idyntree-yarp-tools/idyntree-yarp-tools/build/lib/Release/idyntree-yarp-visualizer.exp
D:\a\idyntree-yarp-tools\idyntree-yarp-tools\build\bin\Release\idyntree-yarp-visualizer.exe : fatal error LNK1169: one or more multiply defined symbols found [D:\a\idyntree-yarp-tools\idyntree-yarp-tools\build\src\modules\idyntree-yarp-visualizer\idyntree-yarp-visualizer.vcxproj]
traversaro commented 3 years ago

Windows CI is failing with error:

D:\a\idyntree-yarp-tools\idyntree-yarp-tools\src\modules\idyntree-yarp-visualizer\RobotConnectors.cpp(360,89): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data [D:\a\idyntree-yarp-tools\idyntree-yarp-tools\build\src\modules\idyntree-yarp-visualizer\idyntree-yarp-visualizer.vcxproj]
  VisualizerCommands.cpp
  Generating Code...
YARP_dev.lib(YARP_dev.dll) : error LNK2005: "public: __cdecl yarp::dev::impl::jointData::jointData(void)" (??0jointData@impl@dev@yarp@@QEAA@XZ) already defined in readonlyremotecontrolboard.lib(jointData.obj) [D:\a\idyntree-yarp-tools\idyntree-yarp-tools\build\src\modules\idyntree-yarp-visualizer\idyntree-yarp-visualizer.vcxproj]
     Creating library D:/a/idyntree-yarp-tools/idyntree-yarp-tools/build/lib/Release/idyntree-yarp-visualizer.lib and object D:/a/idyntree-yarp-tools/idyntree-yarp-tools/build/lib/Release/idyntree-yarp-visualizer.exp
D:\a\idyntree-yarp-tools\idyntree-yarp-tools\build\bin\Release\idyntree-yarp-visualizer.exe : fatal error LNK1169: one or more multiply defined symbols found [D:\a\idyntree-yarp-tools\idyntree-yarp-tools\build\src\modules\idyntree-yarp-visualizer\idyntree-yarp-visualizer.vcxproj]

This was fixed by removing the jointData.cpp . I updated the main PR body with a description of the changes, the PR should now be ready for review.

S-Dafarra commented 3 years ago

To be honest, I am not sure why the jointData.cpp file was needed in the first place :thinking: