[program_options] undefined reference using mingw
, boost::re_detail::cpp_regex_traits_implementation<char>
::do_get(boost::re_d etail::cpp_regex_traits_base<char> const&, unsigned int)::s_databy linking to __ imp___ZZN5boost12object_cacheINS_9re_detail21cpp_regex_traits_baseIcEENS1_31cpp_ regex_traits_implementationIcEEE6do_getERKS3_jE6s_data (auto-import) Info: resolving boost::cpp_regex_traits<char>::get_catalog_name_inst()::s_name by linking to __imp___ZZN5boost16cpp_regex_traitsIcE21get_catalog_name_instEvE 6s_name (auto-import) CMakeFiles/rewrite.dir/src/rewrite.obj:rewrite.cpp:(.text$_ZN5boost15program_opt ions25basic_command_line_parserIcE7optionsERKNS0_19options_descriptionE[boost::p rogram_options::basic_command_line_parser<char>::options(boost::program_options: :options_description const&)]+0x1a): undefined reference to `boost::program_opti ons::detail::cmdline::set_options_description(boost::program_options::options_de
::extra_parser(boost::function1<std::pair<std::basic_string<char, std::char_tra its<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char , std::allocator<char> > >, std::basic_string<char, std::char_traits<char>, std ::allocator<char> > const&, std::allocator<boost::function_base> >)]+0x75): unde fined reference to `boost::program_options::detail::cmdline::set_additional_pars er(boost::function1<std::pair<std::string, std::string>, std::string const&, std ::allocator<boost::function_base> >)' CMakeFiles/rewrite.dir/src/rewrite.obj:rewrite.cpp:(.text$_ZN5boost15program_opt ions25basic_command_line_parserIcEC1EiPPc[boost::program_options::basic_command_
Hello all. I am trying to port a C++ program developed on Linux/g++ to Windows using MinGW. Boost was a joy to compile using MinGW and bjam and my program compiles fine, but failes during linking. The offending function calls seem to be two calls to program_options::store: po::store(po::command_line_parser(argc, argv).options(desc).positional(p).run(), vm); po::store(po::parse_command_line(argc, argv, desc), vm); Commenting out these two lines makes my program compile, but without parsing the command line of course. This problem seems to be related to mingw lacking wchar support. Apparently, Valadimir Prus made some patches for this in 2004. http://aspn.activestate.com/ASPN/Mail/Message/boost/2082829 I have recompiled program_options with his patched, but to no avail. Is anyone successfully using program_options using mingw? "H:\Program Files\CMake 2.4\bin\cmake.exe" -P CMakeFiles\rewrite.dir\cmake_clean _target.cmake h:\mingw\bin\g++.exe -O3 -DNDEBUG "CMakeFiles/rewrite.dir/src/rewrite.obj" "CMakeFiles/rewrite.dir/src/DyadicTrianglesVBO.obj" "CMakeFiles/rewrite.dir/src /HistoPyramid.obj" "CMakeFiles/rewrite.dir/src/BasisFuncTexture.obj" "CMakeFiles /rewrite.dir/src/BasisFunctions.obj" "CMakeFiles/rewrite.dir/src/ShaderSource.ob j" "CMakeFiles/rewrite.dir/src/Utility.obj" "CMakeFiles/rewrite.dir/src/Animate. obj" "CMakeFiles/rewrite.dir/src/CubicBezierCoefficients.obj" "CMakeFiles/rewrit e.dir/src/DataStructures.obj" MakeFiles/rewrite.dir/src/ImportSff.obj" -o re write.exe -Lh:\DOCUME~1\JOHANS~1\WORKSP~1\shallows -Lh:\DOCUME~1\JOHANS~1\WORKS P~1\libdyk -Lh:\local\lib -Lh:\boost\lib -lshallows -ldyk -lglu32 -lopengl32 -lg lut32 -lglew32 -lboost_program_options-mgw -lboost_regex-mgw Info: resolving vtable for boost::program_options::validation_errorby linking to __imp___ZTVN5boost15program_options16validation_errorE (auto-import) Info: resolving boost::program_options::arg by linking to __imp___ZN5boost1 5program_options3argE (auto-import) Info: resolving vtable for boost::program_options::variables_mapby linking to __ imp___ZTVN5boost15program_options13variables_mapE (auto-import) Info: resolving boost::re_detail::cpp_regex_traits_implementation<char>::init(): :null_string by linking to __imp___ZZN5boost9re_detail31cpp_regex_traits_imple mentationIcE4initEvE11null_string (auto-import) Info: resolving boost::object_cache<boost::re_detail::cpp_regex_traits_base<char scription const&)' CMakeFiles/rewrite.dir/src/rewrite.obj:rewrite.cpp:(.text$_ZN5boost15program_opt ions25basic_command_line_parserIcE10positionalERKNS0_30positional_options_descri ptionE[boost::program_options::basic_command_line_parser<char>::positional(boost ::program_options::positional_options_description const&)]+0x15): undefined refe rence to `boost::program_options::detail::cmdline::set_positional_options(boost: :program_options::positional_options_description const&)' CMakeFiles/rewrite.dir/src/rewrite.obj:rewrite.cpp:(.text$_ZN5boost15program_opt ions25basic_command_line_parserIcE5styleEi[boost::program_options::basic_command _line_parser<char>::style(int)]+0x15): undefined reference to `boost::program_op tions::detail::cmdline::style(int)' CMakeFiles/rewrite.dir/src/rewrite.obj:rewrite.cpp:(.text$_ZN5boost15program_opt ions25basic_command_line_parserIcE12extra_parserENS_9function1ISt4pairISsSsERKSs SaINS_13function_baseEEEE[boost::program_options::basic_command_line_parser<char line_parser<char>::basic_command_line_parser(int, char**)]+0x91): undefined refe rence to `boost::program_options::detail::cmdline::cmdline(std::vector<std::stri ng, std::allocator<std::string> > const&)' CMakeFiles/rewrite.dir/src/rewrite.obj:rewrite.cpp:(.text$_ZN5boost15program_opt ions25basic_command_line_parserIcE3runEv[boost::program_options::basic_command_l ine_parser<char>::run()]+0x7c): undefined reference to `boost::program_options:: detail::cmdline::run()' collect2: ld returned 1 exit status mingw32-make[2]: *** [rewrite.exe] Error 1 mingw32-make[2]: Leaving directory `H:/Documents and Settings/Johan Simon Seland /workspace/gpusilhouette' mingw32-make[1]: *** [CMakeFiles/rewrite.dir/all] Error 2 mingw32-make[1]: Leaving directory `H:/Documents and Settings/Johan Simon Seland /workspace/gpusilhouette' mingw32-make: *** [all] Error 2
participants (1)
-
Johan Simon Seland