2017-08-13 132 views
0

我试着用其他主题中提出的解决方案,但他们没有为我工作。我正在编译一个程序,并且在配置脚本(其中所有链接到所请求的库的所有链接都经过成功检查和验证)后,我遇到了“make all”命令的问题,接收到的输出如下所示。 Boost_1.64.0已经用命令编译未定义的引用来提升使用C++ 11

./bootstrap.sh 

./b2 toolset=gcc cxxflags=-std=c++11 

和我用来安装这个程序的编译器(gcc/g ++ - 4.8)。所有到共享库文件的链接.so (boost_filesystem,boost_programoptions等)工作没有错误,因为我运行boost教程没有问题。

g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"0.9.0\" -DPACKAGE_STRING=\"OpenFoam\ Suite\ 0.9.0\" -DPACKAGE_URL=\"\" -DPACKAGE=\"suite\" -DVERSION=\"0.9.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DPACKAGE=\"suite\" -DVERSION=\"0.9.0\" -I. -I/home/giuseppe/OpenFOAM/OpenSMOKEppSolvers/OpenSMOKEpp-master/source -I../../src -I/home/giuseppe/OpenFOAM/lib_flameletSMOKE/eigen-eigen-67e894c6cd8f -I/home/giuseppe/OpenFOAM/lib_flameletSMOKE/rapidxml-1.13 -I/home/giuseppe/OpenFOAM/lib_flameletSMOKE/boost_1_64_0/ -O3 -m64 -fPIC -std=c++11 -fopenmp -MT ../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o -MD -MP -MF ../../src/licensegenerator/.deps/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.Tpo -c -o ../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o `test -f '../../src/licensegenerator/LicenseGenerator.cpp' || echo './'`../../src/licensegenerator/LicenseGenerator.cpp 
mv -f ../../src/licensegenerator/.deps/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.Tpo ../../src/licensegenerator/.deps/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.Po 
g++ -O3 -m64 -fPIC -std=c++11 -fopenmp -L/home/giuseppe/OpenFOAM/lib_flameletSMOKE/boost_1_64_0/stage/lib -lboost_regex -lboost_timer -lboost_chrono -lboost_date_time -lboost_program_options -lboost_filesystem -lboost_system -lgfortran -o OpenSMOKEpp_LicenseGenerator.sh ../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `OpenSMOKE::CreateDirectory(boost::filesystem::path const&)': 
LicenseGenerator.cpp:(.text+0x99b): undefined reference to `boost::filesystem::detail::create_directories(boost::filesystem::path const&, boost::system::error_code*)' 
LicenseGenerator.cpp:(.text+0x9a8): undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `OpenSMOKE::OpenSMOKE_DictionaryGrammar::ErrorMessage(std::string) const': 
LicenseGenerator.cpp:(.text+0x2530): undefined reference to `boost::filesystem::path::filename() const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `OpenSMOKE::CheckKineticsFolder(boost::filesystem::path const&)': 
LicenseGenerator.cpp:(.text+0x327d): undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)' 
LicenseGenerator.cpp:(.text+0x3331): undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)' 
LicenseGenerator.cpp:(.text+0x33eb): undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)' 
LicenseGenerator.cpp:(.text+0x342f): undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)' 
LicenseGenerator.cpp:(.text+0x34ff): undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)' 
LicenseGenerator.cpp:(.text+0x3539): undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `OpenSMOKE::OpenInputFileASCII(std::basic_ifstream<char, std::char_traits<char> >&, boost::filesystem::path)': 
LicenseGenerator.cpp:(.text+0x4a9d): undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `OpenSMOKE::InputFileDictionary::Status(std::ostream&) const': 
LicenseGenerator.cpp:(.text+0x58cc): undefined reference to `boost::filesystem::path::filename() const' 
LicenseGenerator.cpp:(.text+0x5918): undefined reference to `boost::filesystem::path::parent_path() const' 
LicenseGenerator.cpp:(.text+0x5a07): undefined reference to `boost::filesystem::detail::file_size(boost::filesystem::path const&, boost::system::error_code*)' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `OpenSMOKE::OpenSMOKE_DictionaryGrammar::ShortSummary(std::ostream&) const': 
LicenseGenerator.cpp:(.text+0x5b5b): undefined reference to `boost::filesystem::path::filename() const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `OpenSMOKE::OpenInputFileXML(rapidxml::xml_document<char>&, std::vector<char, std::allocator<char> >&, boost::filesystem::path const&)': 
LicenseGenerator.cpp:(.text+0x11b9e): undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `OpenSMOKE::ImportReactionNames(boost::filesystem::path, unsigned int, std::vector<std::string, std::allocator<std::string> >&)': 
LicenseGenerator.cpp:(.text+0x12380): undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `OpenSMOKE::OpenSMOKE_CheckLicense(boost::filesystem::path, std::string, unsigned int&)': 
LicenseGenerator.cpp:(.text+0x17ae8): undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)' 
LicenseGenerator.cpp:(.text+0x17b55): undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::program_options::typed_value<std::string, char>::xparse(boost::any&, std::vector<std::string, std::allocator<std::string> > const&) const': 
LicenseGenerator.cpp:(.text._ZNK5boost15program_options11typed_valueISscE6xparseERNS_3anyERKSt6vectorISsSaISsEE[_ZNK5boost15program_options11typed_valueISscE6xparseERNS_3anyERKSt6vectorISsSaISsEE]+0x19): undefined reference to `boost::program_options::validate(boost::any&, std::vector<std::string, std::allocator<std::string> > const&, std::string*, int)' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::string const&, std::string const&, int)': 
LicenseGenerator.cpp:(.text._ZN5boost15program_options16validation_errorC2ENS1_6kind_tERKSsS4_i[_ZN5boost15program_options16validation_errorC5ENS1_6kind_tERKSsS4_i]+0x26): undefined reference to `boost::program_options::validation_error::get_template(boost::program_options::validation_error::kind_t)' 
LicenseGenerator.cpp:(.text._ZN5boost15program_options16validation_errorC2ENS1_6kind_tERKSsS4_i[_ZN5boost15program_options16validation_errorC5ENS1_6kind_tERKSsS4_i]+0x3c): undefined reference to `boost::program_options::error_with_option_name::error_with_option_name(std::string const&, std::string const&, std::string const&, int)' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::program_options::typed_value<std::string, char>::name() const': 
LicenseGenerator.cpp:(.text._ZNK5boost15program_options11typed_valueISscE4nameEv[_ZNK5boost15program_options11typed_valueISscE4nameEv]+0x25): undefined reference to `boost::program_options::arg' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::program_options::typed_value<unsigned int, char>::name() const': 
LicenseGenerator.cpp:(.text._ZNK5boost15program_options11typed_valueIjcE4nameEv[_ZNK5boost15program_options11typed_valueIjcE4nameEv]+0x25): undefined reference to `boost::program_options::arg' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::program_options::error_with_option_name::~error_with_option_name()': 
LicenseGenerator.cpp:(.text._ZN5boost15program_options22error_with_option_nameD2Ev[_ZN5boost15program_options22error_with_option_nameD5Ev]+0xc): undefined reference to `vtable for boost::program_options::error_with_option_name' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::program_options::validation_error::~validation_error()': 
LicenseGenerator.cpp:(.text._ZN5boost15program_options16validation_errorD2Ev[_ZN5boost15program_options16validation_errorD5Ev]+0xc): undefined reference to `vtable for boost::program_options::error_with_option_name' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::program_options::invalid_option_value::~invalid_option_value()': 
LicenseGenerator.cpp:(.text._ZN5boost15program_options20invalid_option_valueD2Ev[_ZN5boost15program_options20invalid_option_valueD5Ev]+0xc): undefined reference to `vtable for boost::program_options::error_with_option_name' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::program_options::error_with_option_name::~error_with_option_name()': 
LicenseGenerator.cpp:(.text._ZN5boost15program_options22error_with_option_nameD0Ev[_ZN5boost15program_options22error_with_option_nameD0Ev]+0xc): undefined reference to `vtable for boost::program_options::error_with_option_name' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::program_options::validation_error::~validation_error()': 
LicenseGenerator.cpp:(.text._ZN5boost15program_options16validation_errorD0Ev[_ZN5boost15program_options16validation_errorD0Ev]+0xc): undefined reference to `vtable for boost::program_options::error_with_option_name' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:LicenseGenerator.cpp:(.text._ZN5boost15program_options20invalid_option_valueD0Ev[_ZN5boost15program_options20invalid_option_valueD0Ev]+0xc): more undefined references to `vtable for boost::program_options::error_with_option_name' follow 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::date_time::ymd_formatter<boost::date_time::year_month_day_base<boost::gregorian::greg_year, boost::gregorian::greg_month, boost::gregorian::greg_day>, boost::date_time::simple_format<char>, char>::ymd_to_string(boost::date_time::year_month_day_base<boost::gregorian::greg_year, boost::gregorian::greg_month, boost::gregorian::greg_day>)': 
LicenseGenerator.cpp:(.text._ZN5boost9date_time13ymd_formatterINS0_19year_month_day_baseINS_9gregorian9greg_yearENS3_10greg_monthENS3_8greg_dayEEENS0_13simple_formatIcEEcE13ymd_to_stringES7_[_ZN5boost9date_time13ymd_formatterINS0_19year_month_day_baseINS_9gregorian9greg_yearENS3_10greg_monthENS3_8greg_dayEEENS0_13simple_formatIcEEcE13ymd_to_stringES7_]+0x1d5): undefined reference to `boost::gregorian::greg_month::as_short_string() const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::program_options::basic_command_line_parser<char>::run()': 
LicenseGenerator.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcE3runEv[_ZN5boost15program_options25basic_command_line_parserIcE3runEv]+0x1b): undefined reference to `boost::program_options::detail::cmdline::get_canonical_option_prefix()' 
LicenseGenerator.cpp:(.text._ZN5boost15program_options25basic_command_line_parserIcE3runEv[_ZN5boost15program_options25basic_command_line_parserIcE3runEv]+0x50): undefined reference to `boost::program_options::detail::cmdline::run()' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::program_options::basic_parsed_options<char> boost::program_options::parse_command_line<char>(int, char const* const*, boost::program_options::options_description const&, int, boost::function1<std::pair<std::string, std::string>, std::string const&>)': 
LicenseGenerator.cpp:(.text._ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairISsSsERKSsEE[_ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairISsSsERKSsEE]+0x1ea): undefined reference to `boost::program_options::to_internal(std::string const&)' 
LicenseGenerator.cpp:(.text._ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairISsSsERKSsEE[_ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairISsSsERKSsEE]+0x247): undefined reference to `boost::program_options::detail::cmdline::cmdline(std::vector<std::string, std::allocator<std::string> > const&)' 
LicenseGenerator.cpp:(.text._ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairISsSsERKSsEE[_ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairISsSsERKSsEE]+0x270): undefined reference to `boost::program_options::detail::cmdline::set_options_description(boost::program_options::options_description const&)' 
LicenseGenerator.cpp:(.text._ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairISsSsERKSsEE[_ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairISsSsERKSsEE]+0x289): undefined reference to `boost::program_options::detail::cmdline::style(int)' 
LicenseGenerator.cpp:(.text._ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairISsSsERKSsEE[_ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairISsSsERKSsEE]+0x2f5): undefined reference to `boost::program_options::detail::cmdline::set_additional_parser(boost::function1<std::pair<std::string, std::string>, std::string const&>)' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `unsigned short boost::date_time::month_str_to_ushort<boost::gregorian::greg_month>(std::string const&)': 
LicenseGenerator.cpp:(.text._ZN5boost9date_time19month_str_to_ushortINS_9gregorian10greg_monthEEEtRKSs[_ZN5boost9date_time19month_str_to_ushortINS_9gregorian10greg_monthEEEtRKSs]+0x11a): undefined reference to `boost::gregorian::greg_month::get_month_map_ptr()' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::program_options::variables_map::~variables_map()': 
LicenseGenerator.cpp:(.text._ZN5boost15program_options13variables_mapD2Ev[_ZN5boost15program_options13variables_mapD5Ev]+0x3): undefined reference to `vtable for boost::program_options::variables_map' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `main': 
LicenseGenerator.cpp:(.text.startup+0x67): undefined reference to `boost::filesystem::detail::system_complete(boost::filesystem::path const&, boost::system::error_code*)' 
LicenseGenerator.cpp:(.text.startup+0x8b): undefined reference to `boost::filesystem::path::parent_path() const' 
LicenseGenerator.cpp:(.text.startup+0x142): undefined reference to `boost::program_options::options_description::m_default_line_length' 
LicenseGenerator.cpp:(.text.startup+0x17a): undefined reference to `boost::program_options::options_description::options_description(std::string const&, unsigned int, unsigned int)' 
LicenseGenerator.cpp:(.text.startup+0x222): undefined reference to `boost::program_options::options_description::add_options()' 
LicenseGenerator.cpp:(.text.startup+0x240): undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)' 
LicenseGenerator.cpp:(.text.startup+0x259): undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, boost::program_options::value_semantic const*, char const*)' 
LicenseGenerator.cpp:(.text.startup+0x272): undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, boost::program_options::value_semantic const*, char const*)' 
LicenseGenerator.cpp:(.text.startup+0x28d): undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, boost::program_options::value_semantic const*, char const*)' 
LicenseGenerator.cpp:(.text.startup+0x295): undefined reference to `boost::program_options::variables_map::variables_map()' 
LicenseGenerator.cpp:(.text.startup+0x2d0): undefined reference to `boost::program_options::store(boost::program_options::basic_parsed_options<char> const&, boost::program_options::variables_map&, bool)' 
LicenseGenerator.cpp:(.text.startup+0x352): undefined reference to `boost::program_options::operator<<(std::ostream&, boost::program_options::options_description const&)' 
LicenseGenerator.cpp:(.text.startup+0x464): undefined reference to `boost::program_options::abstract_variables_map::operator[](std::string const&) const' 
LicenseGenerator.cpp:(.text.startup+0x4f9): undefined reference to `boost::program_options::abstract_variables_map::operator[](std::string const&) const' 
LicenseGenerator.cpp:(.text.startup+0x528): undefined reference to `boost::program_options::notify(boost::program_options::variables_map&)' 
LicenseGenerator.cpp:(.text.startup+0x145c): undefined reference to `boost::program_options::operator<<(std::ostream&, boost::program_options::options_description const&)' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `_GLOBAL__sub_I_LicenseGenerator.cpp': 
LicenseGenerator.cpp:(.text.startup+0x15bb): undefined reference to `boost::system::generic_category()' 
LicenseGenerator.cpp:(.text.startup+0x15c7): undefined reference to `boost::system::generic_category()' 
LicenseGenerator.cpp:(.text.startup+0x15d3): undefined reference to `boost::system::system_category()' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::program_options::variables_map::~variables_map()': 
LicenseGenerator.cpp:(.text._ZN5boost15program_options13variables_mapD0Ev[_ZN5boost15program_options13variables_mapD0Ev]+0x3): undefined reference to `vtable for boost::program_options::variables_map' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `boost::program_options::error_with_option_name::error_with_option_name(boost::program_options::error_with_option_name const&)': 
LicenseGenerator.cpp:(.text._ZN5boost15program_options22error_with_option_nameC2ERKS1_[_ZN5boost15program_options22error_with_option_nameC5ERKS1_]+0x2f): undefined reference to `vtable for boost::program_options::error_with_option_name' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o: In function `void boost::program_options::validate<unsigned int, char>(boost::any&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, unsigned int*, long)': 
LicenseGenerator.cpp:(.text._ZN5boost15program_options8validateIjcEEvRNS_3anyERKSt6vectorISbIT0_St11char_traitsIS5_ESaIS5_EESaIS9_EEPT_l[_ZN5boost15program_options8validateIjcEEvRNS_3anyERKSt6vectorISbIT0_St11char_traitsIS5_ESaIS5_EESaIS9_EEPT_l]+0x12): undefined reference to `boost::program_options::validators::check_first_occurrence(boost::any const&)' 
LicenseGenerator.cpp:(.text._ZN5boost15program_options8validateIjcEEvRNS_3anyERKSt6vectorISbIT0_St11char_traitsIS5_ESaIS5_EESaIS9_EEPT_l[_ZN5boost15program_options8validateIjcEEvRNS_3anyERKSt6vectorISbIT0_St11char_traitsIS5_ESaIS5_EESaIS9_EEPT_l]+0x146): undefined reference to `boost::program_options::invalid_option_value::invalid_option_value(std::string const&)' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE]+0x20): undefined reference to `boost::program_options::error_with_option_name::what() const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE]+0x30): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::string const&) const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE[_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE]+0x28): undefined reference to `boost::program_options::error_with_option_name::what() const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE[_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE]+0x38): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::string const&) const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE]+0x20): undefined reference to `boost::program_options::error_with_option_name::what() const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE]+0x30): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::string const&) const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE[_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE]+0x28): undefined reference to `boost::program_options::error_with_option_name::what() const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE[_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE]+0x38): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::string const&) const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTIN5boost15program_options16validation_errorE[_ZTIN5boost15program_options16validation_errorE]+0x10): undefined reference to `typeinfo for boost::program_options::error_with_option_name' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTIN5boost15program_options11typed_valueIjcEE[_ZTIN5boost15program_options11typed_valueIjcEE]+0x18): undefined reference to `typeinfo for boost::program_options::value_semantic_codecvt_helper<char>' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTIN5boost15program_options11typed_valueISscEE[_ZTIN5boost15program_options11typed_valueISscEE]+0x18): undefined reference to `typeinfo for boost::program_options::value_semantic_codecvt_helper<char>' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTVN5boost15program_options16validation_errorE[_ZTVN5boost15program_options16validation_errorE]+0x20): undefined reference to `boost::program_options::error_with_option_name::what() const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTVN5boost15program_options16validation_errorE[_ZTVN5boost15program_options16validation_errorE]+0x30): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::string const&) const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTVN5boost15program_options20invalid_option_valueE[_ZTVN5boost15program_options20invalid_option_valueE]+0x20): undefined reference to `boost::program_options::error_with_option_name::what() const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTVN5boost15program_options20invalid_option_valueE[_ZTVN5boost15program_options20invalid_option_valueE]+0x30): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::string const&) const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTVN5boost15program_options11typed_valueIjcEE[_ZTVN5boost15program_options11typed_valueIjcEE]+0x40): undefined reference to `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::string, std::allocator<std::string> > const&, bool) const' 
../../src/licensegenerator/OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o:(.data.rel.ro._ZTVN5boost15program_options11typed_valueISscEE[_ZTVN5boost15program_options11typed_valueISscEE]+0x40): undefined reference to `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::string, std::allocator<std::string> > const&, bool) const' 
collect2: error: ld returned 1 exit status 
make: *** [OpenSMOKEpp_LicenseGenerator.sh] Error 1 

回答

0

该问题可能是由链接器命令行中参数的错误顺序引起的。所有依赖于OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o的库都必须在命令行中的此对象文件之后指定。链接器按照它们在命令行中指定的顺序加载对象文件和库,因此以后的库需要满足来自OpenSMOKEpp_LicenseGenerator_sh-LicenseGenerator.o的每个未解决的符号引用。这同样适用于链接器命令行中的所有其他库和/或对象文件。