Skip to content
New issue

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

[Win32] Add win32 compatibility. #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

francois-keith
Copy link
Member

ltdl research commands are run only in non win32 systems.
Sync cmake and shared-tests
Correct call to PKG_CONFIG_USE_DEPENDENCY to link with roboptim-core.

ltdl research commands are run only in non win32 systems.
Sync cmake and shared-tests
Correct call to PKG_CONFIG_USE_DEPENDENCY to link with roboptim-core.
@@ -30,7 +30,7 @@ MACRO(IPOPT_PLUGIN NAME)
INSTALL(TARGETS roboptim-core-plugin-${NAME}
DESTINATION ${PLUGINDIR})
PKG_CONFIG_USE_DEPENDENCY(roboptim-core-plugin-${NAME} ipopt)
PKG_CONFIG_USE_COMPILE_DEPENDENCY(roboptim-core-plugin-${NAME} roboptim-core)
PKG_CONFIG_USE_DEPENDENCY(roboptim-core-plugin-${NAME} roboptim-core)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except plugins do not need to be linked with roboptim-core. What was the error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the link, there is a lot of missing symbols :


ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::incindent(class std::basic_ostream > &)" (__imp_?incindent@roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV23@@Z) referenced in function "public: void __cdecl roboptim::detail::printConstraint >::operator() > >(class boost::shared_ptr > const &)" (??$?RV?$shared_ptr@V?$GenericFunction@UEigenMatrixDense@roboptim@@@roboptim@@@boost@@@?$printConstraint@V?$Problem@UEigenMatrixDense@roboptim@@@roboptim@@@detail@roboptim@@QEAAXAEBV?$shared_ptr@V?$GenericFunction@UEigenMatrixDense@roboptim@@@roboptim@@@boost@@@Z)

tnlp.cc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::incindent(class std::basic_ostream > &)" (__imp_?incindent@roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV23@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::decindent(class std::basic_ostream > &)" (__imp_?decindent@roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV23@@Z) referenced in function "public: void __cdecl roboptim::detail::printConstraint >::operator() > >(class boost::shared_ptr > const &)" (??$?RV?$shared_ptr@V?$GenericFunction@UEigenMatrixDense@roboptim@@@roboptim@@@boost@@@?$printConstraint@V?$Problem@UEigenMatrixDense@roboptim@@@roboptim@@@detail@roboptim@@QEAAXAEBV?$shared_ptr@V?$GenericFunction@UEigenMatrixDense@roboptim@@@roboptim@@@boost@@@Z)

tnlp.cc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::decindent(class std::basic_ostream > &)" (__imp_?decindent@roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV23@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::iendl(class std::basic_ostream > &)" (__imp_?iendl@roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV23@@Z) referenced in function "public: void __cdecl roboptim::detail::printConstraint >::operator() > >(class boost::shared_ptr > const &)" (??$?RV?$shared_ptr@V?$GenericFunction@UEigenMatrixDense@roboptim@@@roboptim@@@boost@@@?$printConstraint@V?$Problem@UEigenMatrixDense@roboptim@@@roboptim@@@detail@roboptim@@QEAAXAEBV?$shared_ptr@V?$GenericFunction@UEigenMatrixDense@roboptim@@@roboptim@@@boost@@@Z)

tnlp.cc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::iendl(class std::basic_ostream > &)" (__imp_?iendl@roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV23@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::incendl(class std::basic_ostream > &)" (__imp_?incendl@roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV23@@Z) referenced in function "public: class std::basic_ostream > & __cdecl roboptim::Problem::print(class std::basic_ostream > &)const " (?print@?$Problem@UEigenMatrixDense@roboptim@@@roboptim@@QEBAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV34@@Z)

tnlp.cc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::incendl(class std::basic_ostream > &)" (__imp_?incendl@roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV23@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_string,class std::allocator > const __cdecl roboptim::demangle(char const *)" (__imp_?demangle@roboptim@@YA?BV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBD@Z) referenced in function "class std::basic_string,class std::allocator > __cdecl roboptim::typeString >(void)" (??$typeString@V?$GenericDifferentiableFunction@UEigenMatrixDense@roboptim@@@roboptim@@@roboptim@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl roboptim::SolverWarning::SolverWarning(class std::basic_string,class std::allocator > const &)" (__imp_??0SolverWarning@roboptim@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: virtual void __cdecl roboptim::detail::Tnlp::finalize_solution(enum Ipopt::SolverReturn,int,double const *,double const *,double const *,int,double const *,double const *,double,class Ipopt::IpoptData const *,class Ipopt::IpoptCalculatedQuantities *)" (?finalize_solution@?$Tnlp@VIpoptSolver@roboptim@@@detail@roboptim@@UEAAXW4SolverReturn@Ipopt@@HPEBN11H11NPEBVIpoptData@5@PEAVIpoptCalculatedQuantities@5@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl roboptim::SolverWarning::~SolverWarning(void)" (__imp_??1SolverWarning@roboptim@@UEAA@XZ) referenced in function "public: virtual void * __cdecl roboptim::SolverWarning::`scalar deleting destructor'(unsigned int)" (??_GSolverWarning@roboptim@@UEAAPEAXI@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl roboptim::SolverWarning::SolverWarning(class roboptim::SolverWarning &&)" (__imp_??0SolverWarning@roboptim@@QEAA@$$QEAV01@@Z) referenced in function "class roboptim::SolverWarning * __cdecl std::_Uninit_move,class roboptim::SolverWarning>(class roboptim::SolverWarning *,class roboptim::SolverWarning *,class roboptim::SolverWarning *,struct std::_Wrap_alloc > &,class roboptim::SolverWarning *,struct std::_Nonscalar_ptr_iterator_tag)" (??$_Uninit_move@PEAVSolverWarning@roboptim@@PEAV12@V?$allocator@VSolverWarning@roboptim@@@std@@V12@@std@@YAPEAVSolverWarning@roboptim@@PEAV12@00AEAU?$_Wrap_alloc@V?$allocator@VSolverWarning@roboptim@@@std@@@0@0U_Nonscalar_ptr_iterator_tag@0@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl roboptim::Result::Result(__int64,__int64)" (__imp_??0Result@roboptim@@QEAA@_J0@Z) referenced in function "public: virtual void __cdecl roboptim::detail::Tnlp::finalize_solution(enum Ipopt::SolverReturn,int,double const *,double const *,double const *,int,double const *,double const *,double,class Ipopt::IpoptData const *,class Ipopt::IpoptCalculatedQuantities *)" (?finalize_solution@?$Tnlp@VIpoptSolver@roboptim@@@detail@roboptim@@UEAAXW4SolverReturn@Ipopt@@HPEBN11H11NPEBVIpoptData@5@PEAVIpoptCalculatedQuantities@5@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl roboptim::Result::~Result(void)" (__imp_??1Result@roboptim@@UEAA@XZ) referenced in function "public: virtual void * __cdecl roboptim::Result::`scalar deleting destructor'(unsigned int)" (??_GResult@roboptim@@UEAAPEAXI@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl roboptim::Result::Result(class roboptim::Result const &)" (__imp_??0Result@roboptim@@QEAA@AEBV01@@Z) referenced in function "public: __cdecl boost::variant::variant(class roboptim::Result const &)" (??$?0VResult@roboptim@@@?$variant@VNoSolution@roboptim@@VResult@2@VSolverError@2@VResultWithWarnings@2@Uvoid_@0detail@boost@@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@@boost@@QEAA@AEBVResult@roboptim@@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class roboptim::Result & __cdecl roboptim::Result::operator=(class roboptim::Result const &)" (__imp_??4Result@roboptim@@QEAAAEAV01@AEBV01@@Z) referenced in function "public: bool __cdecl boost::variant::apply_visitor >(class boost::detail::variant::direct_assigner &)" (??$apply_visitor@V?$direct_assigner@VResult@roboptim@@@variant@detail@boost@@@?$variant@VNoSolution@roboptim@@VResult@2@VSolverError@2@VResultWithWarnings@2@Uvoid_@0detail@boost@@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@@boost@@QEAA_NAEAV?$direct_assigner@VResult@roboptim@@@variant@detail@1@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::operator<<(class std::basic_ostream > &,class roboptim::Result const &)" (__imp_??6roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV12@AEBVResult@0@@Z) referenced in function "public: void __cdecl boost::detail::variant::printer > >::operator()(class roboptim::Result const &)const " (??$?RVResult@roboptim@@@?$printer@V?$basic_ostream@DU?$char_traits@D@std@@@std@@@variant@detail@boost@@QEBAXAEBVResult@roboptim@@@Z)

tnlp.cc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::operator<<(class std::basic_ostream > &,class roboptim::Result const &)" (__imp_??6roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV12@AEBVResult@0@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl roboptim::SolverError::SolverError(class std::basic_string,class std::allocator > const &,class roboptim::Result const &)" (__imp_??0SolverError@roboptim@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVResult@1@@Z) referenced in function "public: virtual void __cdecl roboptim::detail::Tnlp::finalize_solution(enum Ipopt::SolverReturn,int,double const *,double const *,double const *,int,double const *,double const *,double,class Ipopt::IpoptData const *,class Ipopt::IpoptCalculatedQuantities *)" (?finalize_solution@?$Tnlp@VIpoptSolver@roboptim@@@detail@roboptim@@UEAAXW4SolverReturn@Ipopt@@HPEBN11H11NPEBVIpoptData@5@PEAVIpoptCalculatedQuantities@5@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl roboptim::SolverError::SolverError(class roboptim::SolverError const &)" (__imp_??0SolverError@roboptim@@QEAA@AEBV01@@Z) referenced in function "public: __cdecl boost::variant::variant(class roboptim::SolverError &&,void *,void *)" (??$?0VSolverError@roboptim@@@?$variant@VNoSolution@roboptim@@VResult@2@VSolverError@2@VResultWithWarnings@2@Uvoid_@0detail@boost@@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@@boost@@QEAA@$$QEAVSolverError@roboptim@@PEAX1@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl roboptim::SolverError::~SolverError(void)" (__imp_??1SolverError@roboptim@@UEAA@XZ) referenced in function "public: virtual void * __cdecl roboptim::SolverError::`scalar deleting destructor'(unsigned int)" (??_GSolverError@roboptim@@UEAAPEAXI@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class roboptim::SolverError & __cdecl roboptim::SolverError::operator=(class roboptim::SolverError const &)" (__imp_??4SolverError@roboptim@@QEAAAEAV01@AEBV01@@Z) referenced in function "public: bool __cdecl boost::variant::apply_visitor >(class boost::detail::variant::direct_mover &)" (??$apply_visitor@V?$direct_mover@VSolverError@roboptim@@@variant@detail@boost@@@?$variant@VNoSolution@roboptim@@VResult@2@VSolverError@2@VResultWithWarnings@2@Uvoid_@0detail@boost@@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@@boost@@QEAA_NAEAV?$direct_mover@VSolverError@roboptim@@@variant@detail@1@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::operator<<(class std::basic_ostream > &,class roboptim::SolverError const &)" (__imp_??6roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV12@AEBVSolverError@0@@Z) referenced in function "public: void __cdecl boost::detail::variant::printer > >::operator()(class roboptim::SolverError const &)const " (??$?RVSolverError@roboptim@@@?$printer@V?$basic_ostream@DU?$char_traits@D@std@@@std@@@variant@detail@boost@@QEBAXAEBVSolverError@roboptim@@@Z)

tnlp.cc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::operator<<(class std::basic_ostream > &,class roboptim::SolverError const &)" (__imp_??6roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV12@AEBVSolverError@0@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl roboptim::ResultWithWarnings::~ResultWithWarnings(void)" (__imp_??1ResultWithWarnings@roboptim@@UEAA@XZ) referenced in function "public: virtual void * __cdecl roboptim::ResultWithWarnings::`scalar deleting destructor'(unsigned int)" (??_GResultWithWarnings@roboptim@@UEAAPEAXI@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl roboptim::ResultWithWarnings::ResultWithWarnings(class roboptim::ResultWithWarnings const &)" (__imp_??0ResultWithWarnings@roboptim@@QEAA@AEBV01@@Z) referenced in function "private: void __cdecl boost::variant::move_assigner::assign_impl(class roboptim::ResultWithWarnings &,struct boost::mpl::bool_<0>,struct boost::mpl::bool_<0>,struct boost::mpl::bool_<1>)const " (??$assign_impl@VResultWithWarnings@roboptim@@@move_assigner@?$variant@VNoSolution@roboptim@@VResult@2@VSolverError@2@VResultWithWarnings@2@Uvoid_@0detail@boost@@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@U6078@@boost@@AEBAXAEAVResultWithWarnings@roboptim@@U?$bool_@$0A@@mpl@2@1U?$bool_@$00@62@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class roboptim::ResultWithWarnings & __cdecl roboptim::ResultWithWarnings::operator=(class roboptim::ResultWithWarnings const &)" (__imp_??4ResultWithWarnings@roboptim@@QEAAAEAV01@AEBV01@@Z) referenced in function "public: void __cdecl boost::detail::variant::move_storage::internal_visit(class roboptim::ResultWithWarnings &,int)const " (??$internal_visit@VResultWithWarnings@roboptim@@@move_storage@variant@detail@boost@@QEBAXAEAVResultWithWarnings@roboptim@@H@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl roboptim::GenericSolver::GenericSolver(void)" (__imp_??0GenericSolver@roboptim@@QEAA@XZ) referenced in function "public: __cdecl roboptim::Solver::Solver(class roboptim::Problem const &)" (??0?$Solver@UEigenMatrixDense@roboptim@@@roboptim@@QEAA@AEBV?$Problem@UEigenMatrixDense@roboptim@@@1@@Z)

tnlp.cc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl roboptim::GenericSolver::GenericSolver(void)" (__imp_??0GenericSolver@roboptim@@QEAA@XZ)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl roboptim::GenericSolver::GenericSolver(class roboptim::GenericSolver const &)" (__imp_??0GenericSolver@roboptim@@QEAA@AEBV01@@Z) referenced in function "public: __cdecl roboptim::Solver::Solver(class roboptim::Solver const &)" (??0?$Solver@UEigenMatrixDense@roboptim@@@roboptim@@QEAA@AEBV01@@Z)

tnlp.cc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl roboptim::GenericSolver::GenericSolver(class roboptim::GenericSolver const &)" (__imp_??0GenericSolver@roboptim@@QEAA@AEBV01@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl roboptim::GenericSolver::~GenericSolver(void)" (__imp_??1GenericSolver@roboptim@@UEAA@XZ) referenced in function "int `public: __cdecl roboptim::Solver::Solver(class Solver::dtor$0 const &)'::`1'::dtor$0" (?dtor$0@?0???0?$Solver@UEigenMatrixDense@roboptim@@@roboptim@@QEAA@AEBV01@@Z@4HA)

tnlp.cc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl roboptim::GenericSolver::~GenericSolver(void)" (__imp_??1GenericSolver@roboptim@@UEAA@XZ)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::operator<<(class std::basic_ostream > &,class roboptim::NoSolution const &)" (__imp_??6roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV12@AEBVNoSolution@0@@Z) referenced in function "public: void __cdecl boost::detail::variant::printer > >::operator()(class roboptim::NoSolution const &)const " (??$?RVNoSolution@roboptim@@@?$printer@V?$basic_ostream@DU?$char_traits@D@std@@@std@@@variant@detail@boost@@QEBAXAEBVNoSolution@roboptim@@@Z)

tnlp.cc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::operator<<(class std::basic_ostream > &,class roboptim::NoSolution const &)" (__imp_??6roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV12@AEBVNoSolution@0@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl roboptim::Parameter::Parameter(void)" (__imp_??0Parameter@roboptim@@QEAA@XZ) referenced in function "public: __cdecl std::pair,class std::allocator > const ,struct roboptim::Parameter>::pair,class std::allocator > const ,struct roboptim::Parameter>,class std::allocator > &&>(struct std::piecewise_construct_t,class std::tuple,class std::allocator > &&>,class std::tuple<>)" (??$?0$$QEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@$$Z$$V@?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@UParameter@roboptim@@@std@@QEAA@Upiecewise_construct_t@1@V?$tuple@$$QEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@1@V?$tuple@$$V@1@@Z)

ipopt.cc.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::operator<<(class std::basic_ostream > &,struct roboptim::Parameter const &)" (__imp_??6roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV12@AEBUParameter@0@@Z) referenced in function "public: virtual class std::basic_ostream > & __cdecl roboptim::Solver::print(class std::basic_ostream > &)const " (?print@?$Solver@UEigenMatrixDense@roboptim@@@roboptim@@UEBAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV34@@Z)

tnlp.cc.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) class std::basic_ostream > & __cdecl roboptim::operator<<(class std::basic_ostream > &,struct roboptim::Parameter const &)" (__imp_??6roboptim@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV12@AEBUParameter@0@@Z)

ipopt.cc.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_ostream > & __cdecl roboptim::Result::print(class std::basic_ostream > &)const " (?print@Result@roboptim@@UEBAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV34@@Z)

ipopt.cc.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_ostream > & __cdecl roboptim::SolverError::print(class std::basic_ostream > &)const " (?print@SolverError@roboptim@@UEBAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV34@@Z)

ipopt.cc.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_ostream > & __cdecl roboptim::SolverWarning::print(class std::basic_ostream > &)const " (?print@SolverWarning@roboptim@@UEBAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV34@@Z)

roboptim-core-plugin-ipopt.dll : fatal error LNK1120: 30 unresolved externals

Copy link
Member

@bchretien bchretien Jun 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those symbols should come from the main library/executable that loads the plugin, i.e. at runtime. This is what happens on Linux/Mac OS X. According to the dlopen doc:

The mode parameter describes how dlopen() shall operate upon file with respect to the processing of relocations and the scope of visibility of the symbols provided within file. When an executable object file is brought into the address space of a process, it may contain references to symbols whose addresses are not known until the executable object file is loaded.

These references shall be relocated before the symbols can be accessed. The mode parameter governs when these relocations take place and may have the following values:

RTLD_LAZY
Relocations shall be performed at an implementation-defined time, ranging from the time of the dlopen() call until the first reference to a given symbol occurs. Specifying RTLD_LAZY should improve performance on implementations supporting dynamic symbol binding since a process might not reference all of the symbols in an executable object file. And, for systems supporting dynamic symbol resolution for normal process execution, this behavior mimics the normal handling of process execution.
RTLD_NOW
All necessary relocations shall be performed when the executable object file is first loaded. This may waste some processing if relocations are performed for symbols that are never referenced. This behavior may be useful for applications that need to know that all symbols referenced during execution will be available before dlopen() returns.

This can be easily confirmed with nm -CD roboptim-core-plugin-ipopt.so | grep "U roboptim::" on Linux (ltdl uses RTLD_LAZY).

Now, before doing any change to this, I would like to know more about the differences with Windows. Can we achieve the same behavior with dlopen and LoadLibrary (called by ltdl)? A quick search seems to indicate that this is a shortcoming of MSVC... Do you confirm this?

@bchretien
Copy link
Member

Additionally, I can enable AppVeyor for this plugin, but that would mean having a powershell script in jrl-travis that can install Ipopt with its ipopt.pc.

IF (NOT LTDL_H_FOUND)
MESSAGE(FATAL_ERROR
"Failed to find ltdl.h, check that Libtool ltdl is installed.")
ENDIF()
ENDIF()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With ltld-win32, we can use this, i.e. pkg-config check on Windows, and fallback to the current check for other platforms.

@bchretien
Copy link
Member

Concerning Travis, CMake needs to be updated for Precise, cf. this.

@francois-keith
Copy link
Member Author

I didn't have the time to test the issue of missing symbols yet, sorry, but I'd like to respond to your proposal of opening an appveyor.

I think it would be best to open one for roboptim-core-plugin-eigen first, which would be far simpler to setup and test (since there are no extra packages to provide), and highlights the same issue of PKG_CONFIG_USE_XXX_DEPENDENCY, cf there

PKG_CONFIG_USE_DEPENDENCY(roboptim-core-plugin-${NAME} roboptim-core)

... so maybe we could continue this discussion there.

I've created an appveyor on my fork. Once I get it to compile, I'll send the pull requests.

@bchretien
Copy link
Member

Good idea, AppVeyor set for roboptim-core-plugin-eigen!

@codecov-io
Copy link

Current coverage is 76.14%

No coverage report found for master at b6feace.

Powered by Codecov. Last updated by b6feace...3567571

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants