Compiling ex_test_ipopt.cc gives error
.
/tmp/ccexmy3Z.o: In function main': ex_test_ipopt.cc:(.text+0x136): undefined reference toifopt::Problem::Problem()'
ex_test_ipopt.cc:(.text+0x171): undefined reference to ifopt::Problem::AddVariableSet(std::shared_ptr<ifopt::Component>)' ex_test_ipopt.cc:(.text+0x1c1): undefined reference toifopt::Problem::AddConstraintSet(std::shared_ptrifopt::ConstraintSet)'
ex_test_ipopt.cc:(.text+0x20e): undefined reference to ifopt::Problem::AddCostSet(std::shared_ptr<ifopt::ConstraintSet>)' ex_test_ipopt.cc:(.text+0x235): undefined reference toifopt::Problem::PrintCurrent() const'
ex_test_ipopt.cc:(.text+0x285): undefined reference to ifopt::Ipopt::Solve(ifopt::Problem&)' ex_test_ipopt.cc:(.text+0x29b): undefined reference toifopt::Problem::GetOptVariables() const'
/tmp/ccexmy3Z.o: In function ifopt::Component::~Component()': ex_test_ipopt.cc:(.text._ZN5ifopt9ComponentD2Ev[_ZN5ifopt9ComponentD5Ev]+0xd): undefined reference tovtable for ifopt::Component'
/tmp/ccexmy3Z.o: In function ifopt::ExVariables::ExVariables(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': ex_test_ipopt.cc:(.text._ZN5ifopt11ExVariablesC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN5ifopt11ExVariablesC5ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x21): undefined reference toifopt::VariableSet::VariableSet(int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/tmp/ccexmy3Z.o: In function ifopt::ExVariables::GetBounds() const': ex_test_ipopt.cc:(.text._ZNK5ifopt11ExVariables9GetBoundsEv[_ZNK5ifopt11ExVariables9GetBoundsEv]+0x25): undefined reference toifopt::Component::GetRows() const'
/tmp/ccexmy3Z.o: In function ifopt::ConstraintSet::~ConstraintSet()': ex_test_ipopt.cc:(.text._ZN5ifopt13ConstraintSetD2Ev[_ZN5ifopt13ConstraintSetD5Ev]+0xd): undefined reference tovtable for ifopt::ConstraintSet'
/tmp/ccexmy3Z.o: In function ifopt::ExConstraint::ExConstraint(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': ex_test_ipopt.cc:(.text._ZN5ifopt12ExConstraintC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN5ifopt12ExConstraintC5ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x21): undefined reference toifopt::ConstraintSet::ConstraintSet(int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/tmp/ccexmy3Z.o: In function ifopt::ExConstraint::GetValues() const': ex_test_ipopt.cc:(.text._ZNK5ifopt12ExConstraint9GetValuesEv[_ZNK5ifopt12ExConstraint9GetValuesEv]+0x25): undefined reference toifopt::Component::GetRows() const'
ex_test_ipopt.cc:(.text._ZNK5ifopt12ExConstraint9GetValuesEv[_ZNK5ifopt12ExConstraint9GetValuesEv]+0x97): undefined reference to ifopt::Composite::GetComponent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const' /tmp/ccexmy3Z.o: In functionifopt::ExConstraint::GetBounds() const':
ex_test_ipopt.cc:(.text._ZNK5ifopt12ExConstraint9GetBoundsEv[_ZNK5ifopt12ExConstraint9GetBoundsEv]+0x25): undefined reference to ifopt::Component::GetRows() const' /tmp/ccexmy3Z.o: In functionifopt::ExConstraint::FillJacobianBlock(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, Eigen::SparseMatrix<double, 1, int>&) const':
ex_test_ipopt.cc:(.text._ZNK5ifopt12ExConstraint17FillJacobianBlockENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERN5Eigen12SparseMatrixIdLi1EiEE[_ZNK5ifopt12ExConstraint17FillJacobianBlockENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERN5Eigen12SparseMatrixIdLi1EiEE]+0x92): undefined reference to ifopt::Composite::GetComponent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const' /tmp/ccexmy3Z.o: In functionifopt::CostTerm::~CostTerm()':
ex_test_ipopt.cc:(.text._ZN5ifopt8CostTermD2Ev[_ZN5ifopt8CostTermD5Ev]+0xd): undefined reference to vtable for ifopt::CostTerm' /tmp/ccexmy3Z.o: In functionifopt::ExCost::ExCost(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)':
ex_test_ipopt.cc:(.text._ZN5ifopt6ExCostC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN5ifopt6ExCostC5ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1f): undefined reference to ifopt::CostTerm::CostTerm(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /tmp/ccexmy3Z.o: In functionifopt::ExCost::GetCost() const':
ex_test_ipopt.cc:(.text._ZNK5ifopt6ExCost7GetCostEv[_ZNK5ifopt6ExCost7GetCostEv]+0x68): undefined reference to ifopt::Composite::GetComponent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const' /tmp/ccexmy3Z.o: In functionifopt::ExCost::FillJacobianBlock(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, Eigen::SparseMatrix<double, 1, int>&) const':
ex_test_ipopt.cc:(.text._ZNK5ifopt6ExCost17FillJacobianBlockENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERN5Eigen12SparseMatrixIdLi1EiEE[_ZNK5ifopt6ExCost17FillJacobianBlockENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERN5Eigen12SparseMatrixIdLi1EiEE]+0x92): undefined reference to ifopt::Composite::GetComponent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) const' /tmp/ccexmy3Z.o: In functionifopt::Ipopt::Ipopt()':
ex_test_ipopt.cc:(.text._ZN5ifopt5IpoptC2Ev[_ZN5ifopt5IpoptC5Ev]+0x1a): undefined reference to vtable for ifopt::Ipopt' /tmp/ccexmy3Z.o:(.rodata._ZTVN5ifopt6ExCostE[_ZTVN5ifopt6ExCostE]+0x20): undefined reference ...
Which package are you trying to build? A link to github or the ROS wiki page would help a lot. Without knowing what you're trying to build and which local changes you've made, it's difficult to give useful advice.
https://github.com/ethz-adrl/ifopt
I have followed the catkin_make steps for ROS but even the rosrun command doesn't work.
./ifopt/ifopt_core/ifopt_core-test
./ifopt/ifopt_ipopt/ifopt_ipopt-example
rosrun ifopt ifopt_ipopt-example
You should mention that you've cross posted . http://wiki.ros.org/Support#Etiquette
Oh. Sorry I am new to the community. So should I repost it correctly? As I am getting the same error with ROS.