We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
If I include
#include <casadi/casadi.hpp> #include <yarp/os/LogStream.h>
the following error occurs while compiles:
In file included from /home/giuseppe/robotology-superbuild/build/install/include/yarp/os/all.h:26, from /home/giuseppe/Desktop/IronCub/element_transition-maneouvers/modules/point_mass_opt_test/pointMassOptimizer/include/Solver.h:13, from /home/giuseppe/Desktop/IronCub/element_transition-maneouvers/modules/point_mass_opt_test/pointMassOptimizer/src/Solver.cpp:9: /home/giuseppe/robotology-superbuild/build/install/include/yarp/os/LogStream.h:238:22: error: redefinition of ‘template<class T> std::ostream& std::operator<<(std::ostream&, const std::vector<T>&)’ 238 | inline std::ostream& std::operator<<(std::ostream& os, const std::vector<T>& t) | ^~~ In file included from /home/giuseppe/git_repos/casadi/build/install/include/casadi/core/matrix_fwd.hpp:29, from /home/giuseppe/git_repos/casadi/build/install/include/casadi/core/sx_elem.hpp:33, from /home/giuseppe/git_repos/casadi/build/install/include/casadi/core/core.hpp:30, from /home/giuseppe/git_repos/casadi/build/install/include/casadi/casadi.hpp:29, from /home/giuseppe/Desktop/IronCub/element_transition-maneouvers/modules/point_mass_opt_test/pointMassOptimizer/include/Solver.h:12, from /home/giuseppe/Desktop/IronCub/element_transition-maneouvers/modules/point_mass_opt_test/pointMassOptimizer/src/Solver.cpp:9: /home/giuseppe/git_repos/casadi/build/install/include/casadi/core/casadi_misc.hpp:430:12: note: ‘template<class T> std::ostream& std::operator<<(std::ostream&, const std::vector<T>&)’ previously declared here 430 | ostream& operator<<(ostream& stream, const vector<T>& v) { | ^~~~~~~~ make[2]: *** [modules/point_mass_opt_test/pointMassOptimizer/CMakeFiles/TrajOptSolver.dir/build.make:83: modules/point_mass_opt_test/pointMassOptimizer/CMakeFiles/TrajOptSolver.dir/src/Solver.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:361: modules/point_mass_opt_test/pointMassOptimizer/CMakeFiles/TrajOptSolver.dir/all] Error 2 make: *** [Makefile:150: all] Error 2
Configuration (please complete the following information):
The text was updated successfully, but these errors were encountered:
Unfortunately, both yarp and casadi expand std namespace
yarp
casadi
std
https://github.com/casadi/casadi/blob/fadc86444f3c7ab824dc3f2d91d4c0cfe7f9dad5/casadi/core/casadi_misc.hpp#L428-L433
yarp/src/libYARP_os/src/yarp/os/LogStream.h
Lines 28 to 31 in 13d2bc8
Probably the fastest solution avoids using LogStream in your application
cc @traversaro
Sorry, something went wrong.
Thanks for opening the issue! We had a similar discussion in #2067 .
That's the same bug, I'm closing this in favour of #2067
No branches or pull requests
Describe the bug
If I include
the following error occurs while compiles:
Configuration (please complete the following information):
The text was updated successfully, but these errors were encountered: