Closed EnricaSo closed 4 years ago
Try with gcc-4
I've just tried with gcc and g++ version 4.9.3
and I get similar errors:
In function `omgf::ADMMPoint2Point::generateProblem()':
ADMMPoint2Point_omgf.cpp:(.text+0xbfb): undefined reference to `casadi::GenericType::GenericType(std::string const&)'
ADMMPoint2Point_omgf.cpp:(.text+0xda7): undefined reference to `casadi::nlpsol(std::string const&, std::string const&, std::string const&, std::map<std::string, casadi::GenericType, std::less<std::string>, std::allocator<std::pair<std::string const, casadi::GenericType> > > const&)'
ADMMPoint2Point_omgf.cpp:(.text+0xe6e): undefined reference to `casadi::external(std::string const&, std::string const&, std::map<std::string, casadi::GenericType, std::less<std::string>, std::allocator<std::pair<std::string const, casadi::GenericType> > > const&)'
ADMMPoint2Point_omgf.cpp:(.text+0xf08): undefined reference to `casadi::external(std::string const&, std::string const&, std::map<std::string, casadi::GenericType, std::less<std::string>, std::allocator<std::pair<std::string const, casadi::GenericType> > > const&)'
ADMMPoint2Point_omgf.cpp:(.text+0xf9f): undefined reference to `casadi::external(std::string const&, std::string const&, std::map<std::string, casadi::GenericType, std::less<std::string>, std::allocator<std::pair<std::string const, casadi::GenericType> > > const&)'
obj/ADMMPoint2Point_omgf.o: In function `omgf::ADMMPoint2Point::solveUpdx(double, std::vector<omgf::obstacle, std::allocator<omgf::obstacle> >&)':
ADMMPoint2Point_omgf.cpp:(.text+0x2134): undefined reference to `casadi::Function::operator()(std::map<std::string, casadi::Matrix<double>, std::less<std::string>, std::allocator<std::pair<std::string const, casadi::Matrix<double> > > > const&) const'
ADMMPoint2Point_omgf.cpp:(.text+0x21a2): undefined reference to `casadi::Function::stats(int) const'
obj/ADMMPoint2Point_omgf.o: In function `casadi::GenericType::operator std::string() const':
ADMMPoint2Point_omgf.cpp:(.text._ZNK6casadi11GenericTypecvSsEv[_ZNK6casadi11GenericTypecvSsEv]+0x1f): undefined reference to `casadi::GenericType::to_string() const'
obj/Point2Point_omgf.o: In function `omgf::Point2Point::generateProblem()':
Point2Point_omgf.cpp:(.text+0xead): undefined reference to `casadi::GenericType::GenericType(std::string const&)'
Point2Point_omgf.cpp:(.text+0x104d): undefined reference to `casadi::nlpsol(std::string const&, std::string const&, std::string const&, std::map<std::string, casadi::GenericType, std::less<std::string>, std::allocator<std::pair<std::string const, casadi::GenericType> > > const&)'
obj/Point2Point_omgf.o: In function `omgf::Point2Point::generateSubstituteFunctions()':
Point2Point_omgf.cpp:(.text+0x137f): undefined reference to `casadi::external(std::string const&, std::string const&, std::map<std::string, casadi::GenericType, std::less<std::string>, std::allocator<std::pair<std::string const, casadi::GenericType> > > const&)'
Point2Point_omgf.cpp:(.text+0x14b3): undefined reference to `casadi::external(std::string const&, std::string const&, std::map<std::string, casadi::GenericType, std::less<std::string>, std::allocator<std::pair<std::string const, casadi::GenericType> > > const&)'
obj/Point2Point_omgf.o: In function `omgf::Point2Point::solve(double, std::vector<omgf::obstacle, std::allocator<omgf::obstacle> >&)':
Point2Point_omgf.cpp:(.text+0x23ce): undefined reference to `casadi::Function::operator()(std::map<std::string, casadi::Matrix<double>, std::less<std::string>, std::allocator<std::pair<std::string const, casadi::Matrix<double> > > > const&) const'
Point2Point_omgf.cpp:(.text+0x2439): undefined reference to `casadi::Function::stats(int) const'
collect2: error: ld returned 1 exit status
Makefile:66: recipe for target 'bin/FormationPoint2Point' failed
make: *** [bin/FormationPoint2Point] Error 1
Hello!
It works out of the box with python3.5
, casadi3.5.1
and g++4.9
(I was using python2.7
above)
Thank you
Hi! Thank you for sharing this work, it's wonderful!
I'm trying to export the
formation_holonomic_export.py
example and build it to an executable, but I'm getting into some troubles. The export works properly: I get a folderexport_f
with thesrc
code, theinstructions.txt
and aMakefile
.In the
Makefile
I replace the content of these variables (where***
is the path to where I clonedomg-tools
):Then, from the dir
export_f
I issue the commandmake
and I get the following error:If I go to the definition of
Point2Point::generateProblem()
I see that it requiresnlp.so
to be present in the pathCASADIOBJ
. However, inCASADIOBJ
I have no such a file. I'm usingcasadi 3.5.1
that I installed withpip
.Am I doing something wrong? Is there any other documentation for exporting c++ code from
omg-tools
?Thank you in advance!