- 论坛徽章:
- 19
|
刚开始使用Boost
Windows 7 64bit
Eclipse+Mingw [gcc version 4.8.1 (rev2, Built by MinGW-builds project)]
boost_1_53_0.7z
从网上找来各种安装代码以及bjam --help产生的安装帮助代码,都会发生这样的问题- bjam.bat install --without-math --without-mpi --without-python toolset=gcc variant=release threading=multi link=shared runtime-link=shared
复制代码 以下错误代码来自Eclipse的提示- 12:55:51 **** Incremental Build of configuration Debug for project RegexBoost ****
- Info: Internal Builder is used for build
- g++ -o RegexBoost.exe regex.o
- regex.o: In function `boost::re_detail::cpp_regex_traits_char_layer<char>::cpp_regex_traits_char_layer(boost::re_detail::cpp_regex_traits_base<char> const&)':
- C:/Boost/include/boost/regex/v4/cpp_regex_traits.hpp:369: undefined reference to `boost::re_detail::cpp_regex_traits_char_layer<char>::init()'
- regex.o: In function `boost::re_detail::raw_storage::extend(unsigned long long)':
- C:/Boost/include/boost/regex/v4/regex_raw_buffer.hpp:131: undefined reference to `boost::re_detail::raw_storage::resize(unsigned long long)'
- regex.o: In function `boost::re_detail::save_state_init::save_state_init(boost::re_detail::saved_state**, boost::re_detail::saved_state**)':
- C:/Boost/include/boost/regex/v4/perl_matcher_non_recursive.hpp:107: undefined reference to `boost::re_detail::get_mem_block()'
- regex.o: In function `boost::re_detail::save_state_init::~save_state_init()':
- C:/Boost/include/boost/regex/v4/perl_matcher_non_recursive.hpp:115: undefined reference to `boost::re_detail::put_mem_block(void*)'
- regex.o: In function `boost::re_detail::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match_imp()':
- C:/Boost/include/boost/regex/v4/perl_matcher_common.hpp:206: undefined reference to `boost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)'
- regex.o: In function `boost::re_detail::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find_imp()':
- C:/Boost/include/boost/regex/v4/perl_matcher_common.hpp:292: undefined reference to `boost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)'
- regex.o: In function `boost::re_detail::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::unwind_extra_block(bool)':
- C:/Boost/include/boost/regex/v4/perl_matcher_non_recursive.hpp:1117: undefined reference to `boost::re_detail::put_mem_block(void*)'
- regex.o: In function `void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type)':
- C:/Boost/include/boost/regex/pattern_except.hpp:75: undefined reference to `boost::re_detail::raise_runtime_error(std::runtime_error const&)'
- regex.o: In function `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find_imp()':
- C:/Boost/include/boost/regex/v4/perl_matcher_common.hpp:292: undefined reference to `boost::re_detail::verify_options(unsigned int, boost::regex_constants::_match_flags)'
- regex.o: In function `boost::re_detail::basic_regex_parser<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::fail(boost::regex_constants::error_type, long long, std::string, long long)':
- C:/Boost/include/boost/regex/v4/basic_regex_parser.hpp:220: undefined reference to `boost::regex_error::regex_error(std::string const&, boost::regex_constants::error_type, long long)'
- C:/Boost/include/boost/regex/v4/basic_regex_parser.hpp:221: undefined reference to `boost::regex_error::raise() const'
- C:/Boost/include/boost/regex/v4/basic_regex_parser.hpp:221: undefined reference to `boost::regex_error::~regex_error()'
- C:/Boost/include/boost/regex/v4/basic_regex_parser.hpp:221: undefined reference to `boost::regex_error::~regex_error()'
- regex.o: In function `boost::re_detail::basic_regex_creator<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::fixup_recursions(boost::re_detail::re_syntax_base*)':
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:793: undefined reference to `boost::regex_error::regex_error(std::string const&, boost::regex_constants::error_type, long long)'
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:794: undefined reference to `boost::regex_error::raise() const'
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:793: undefined reference to `boost::regex_error::~regex_error()'
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:875: undefined reference to `boost::regex_error::regex_error(std::string const&, boost::regex_constants::error_type, long long)'
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:876: undefined reference to `boost::regex_error::raise() const'
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:875: undefined reference to `boost::regex_error::~regex_error()'
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:793: undefined reference to `boost::regex_error::~regex_error()'
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:875: undefined reference to `boost::regex_error::~regex_error()'
- regex.o: In function `boost::re_detail::basic_regex_creator<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::create_startmaps(boost::re_detail::re_syntax_base*)':
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:940: undefined reference to `boost::regex_error::regex_error(std::string const&, boost::regex_constants::error_type, long long)'
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:941: undefined reference to `boost::regex_error::raise() const'
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:940: undefined reference to `boost::regex_error::~regex_error()'
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:940: undefined reference to `boost::regex_error::~regex_error()'
- regex.o: In function `boost::re_detail::basic_regex_creator<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::create_startmap(boost::re_detail::re_syntax_base*, unsigned char*, unsigned int*, unsigned char)':
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:1143: undefined reference to `boost::regex_error::regex_error(std::string const&, boost::regex_constants::error_type, long long)'
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:1144: undefined reference to `boost::regex_error::raise() const'
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:1143: undefined reference to `boost::regex_error::~regex_error()'
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:1143: undefined reference to `boost::regex_error::~regex_error()'
- regex.o: In function `boost::re_detail::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::extend_stack()':
- C:/Boost/include/boost/regex/v4/perl_matcher_non_recursive.hpp:213: undefined reference to `boost::re_detail::get_mem_block()'
- regex.o: In function `boost::re_detail::cpp_regex_traits_implementation<char>::error_string(boost::regex_constants::error_type) const':
- C:/Boost/include/boost/regex/v4/cpp_regex_traits.hpp:445: undefined reference to `boost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
- C:/Boost/include/boost/regex/v4/cpp_regex_traits.hpp:447: undefined reference to `boost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
- regex.o: In function `boost::re_detail::basic_regex_creator<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::insert_state(long long, boost::re_detail::syntax_element_type, unsigned long long)':
- C:/Boost/include/boost/regex/v4/basic_regex_creator.hpp:321: undefined reference to `boost::re_detail::raw_storage::insert(unsigned long long, unsigned long long)'
- regex.o: In function `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::unwind_extra_block(bool)':
- C:/Boost/include/boost/regex/v4/perl_matcher_non_recursive.hpp:1117: undefined reference to `boost::re_detail::put_mem_block(void*)'
- regex.o: In function `boost::object_cache<boost::re_detail::cpp_regex_traits_base<char>, boost::re_detail::cpp_regex_traits_implementation<char> >::get(boost::re_detail::cpp_regex_traits_base<char> const&, unsigned long long)':
- C:/Boost/include/boost/regex/pending/object_cache.hpp:66: undefined reference to `boost::scoped_static_mutex_lock::scoped_static_mutex_lock(boost::static_mutex&, bool)'
- C:/Boost/include/boost/regex/pending/object_cache.hpp:75: undefined reference to `boost::scoped_static_mutex_lock::~scoped_static_mutex_lock()'
- C:/Boost/include/boost/regex/pending/object_cache.hpp:75: undefined reference to `boost::scoped_static_mutex_lock::~scoped_static_mutex_lock()'
- regex.o: In function `boost::re_detail::cpp_regex_traits_implementation<char>::lookup_collatename(char const*, char const*) const':
- C:/Boost/include/boost/regex/v4/cpp_regex_traits.hpp:636: undefined reference to `boost::re_detail::lookup_default_collate_name(std::string const&)'
- regex.o: In function `boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::string> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::extend_stack()':
- C:/Boost/include/boost/regex/v4/perl_matcher_non_recursive.hpp:213: undefined reference to `boost::re_detail::get_mem_block()'
- regex.o: In function `boost::re_detail::cpp_regex_traits_implementation<char>::init()':
- C:/Boost/include/boost/regex/v4/cpp_regex_traits.hpp:678: undefined reference to `boost::re_detail::raise_runtime_error(std::runtime_error const&)'
- C:/Boost/include/boost/regex/v4/cpp_regex_traits.hpp:693: undefined reference to `boost::re_detail::get_default_error_string(boost::regex_constants::error_type)'
- regex.o: In function `boost::cpp_regex_traits<char>::get_catalog_name()':
- C:/Boost/include/boost/regex/v4/cpp_regex_traits.hpp:1062: undefined reference to `boost::scoped_static_mutex_lock::scoped_static_mutex_lock(boost::static_mutex&, bool)'
- C:/Boost/include/boost/regex/v4/cpp_regex_traits.hpp:1065: undefined reference to `boost::scoped_static_mutex_lock::~scoped_static_mutex_lock()'
- C:/Boost/include/boost/regex/v4/cpp_regex_traits.hpp:1065: undefined reference to `boost::scoped_static_mutex_lock::~scoped_static_mutex_lock()'
- collect2.exe: error: ld returned 1 exit status
- 12:55:57 Build Finished (took 6s.35ms)
复制代码 以下是在CMD控制台下编译,因为设置的系统环境变量,因此没有添加参数- E:\Documents\workspace\RegexBoost>g++ regex.cpp
- D:\Temp\ccFDP1rc.o:regex.cpp:(.text$_ZN5boost9re_detail27cpp_regex_traits_char_l
- ayerIcEC2ERKNS0_21cpp_regex_traits_baseIcEE[_ZN5boost9re_detail27cpp_regex_trait
- s_char_layerIcEC2ERKNS0_21cpp_regex_traits_baseIcEE]+0x2b): undefined reference
- to `boost::re_detail::cpp_regex_traits_char_layer<char>::init()'
- D:\Temp\ccFDP1rc.o:regex.cpp:(.text$_ZN5boost9re_detail11raw_storage6extendEy[_Z
- N5boost9re_detail11raw_storage6extendEy]+0x5f): undefined reference to `boost::r
- e_detail::raw_storage::resize(unsigned long long)'
- d:/program files/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_6
- 4-w64-mingw32/bin/ld.exe: D:\Temp\ccFDP1rc.o: bad reloc address 0x5f in section
- `.text$_ZN5boost9re_detail11raw_storage6extendEy[_ZN5boost9re_detail11raw_storag
- e6extendEy]'
- collect2.exe: error: ld returned 1 exit status
复制代码 |
|