Boost mit MinGW unter Windows 7 kompilieren



  • Hi Leute,
    Ich habe ein Problem(wie fast bei jeder Library die ich versuche einzubinden, z.B.: OGRE und OpenCV). Ich würde nämlich gerne Boost nutzen. Ich brauche es, um über das Internet zu kommunizieren. Ich möchte mit diesem Code probieren, ob ich Boost richtig installiert habe:

    //Projekt: BoostTest
    #include <boost/regex.hpp>
    #include <iostream>
    #include <string>
    
    int main()
    {
        std::string line;
        boost::regex pat( "^Subject: (Re: |Aw: )*(.*)" );
    
        while (std::cin)
        {
            std::getline(std::cin, line);
            boost::smatch matches;
            if (boost::regex_match(line, matches, pat))
                std::cout << matches[2] << std::endl;
        }
    }
    

    Mit folgendem Code kompiliere ich:

    SET BINDIR=D:/EigeneProgramme/BoostTest 
    CD /D "D:/EigeneProgramme/BoostTest"
    g++ main.cpp -I "%BOOST_ROOT%" -L "%BOOST_ROOT%\lib\i386\" -boost_regex-vc100-mt-1_52
    pause
    

    Es gibt diesen Fehler:

    C:\Windows\system32>SET BINDIR=D:/EigeneProgramme/BoostTest
    
    C:\Windows\system32>CD /D "D:/EigeneProgramme/BoostTest"
    
    D:\EigeneProgramme\BoostTest>g++ main.cpp -I "C:\Boost" -L "C:\Boost\lib\i386\"
    -boost_regex-vc100-mt-1_52
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l27cpp_regex_traits_char_layerIcEC2ERKNS0_21cpp_regex_traits_baseIcEE[boost::re_
    detail::cpp_regex_traits_char_layer<char>::cpp_regex_traits_char_layer(boost::re
    _detail::cpp_regex_traits_base<char> const&)]+0x20): undefined reference to `boo
    st::re_detail::cpp_regex_traits_char_layer<char>::init()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l11raw_storage6extendEj[boost::re_detail::raw_storage::extend(unsigned int)]+0x4
    1): undefined reference to `boost::re_detail::raw_storage::resize(unsigned int)'
    
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l15save_state_initC1EPPNS0_11saved_stateES4_[boost::re_detail::save_state_init::
    save_state_init(boost::re_detail::saved_state**, boost::re_detail::saved_state**
    )]+0xf): undefined reference to `boost::re_detail::get_mem_block()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l15save_state_initD1Ev[boost::re_detail::save_state_init::~save_state_init()]+0x
    11): undefined reference to `boost::re_detail:LOLut_mem_block(void*)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l12perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS6_EEENS_
    12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE9match_impEv[boost::re_detail:LOLerl_
    matcher<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::c
    har_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gn
    u_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<c
    har>, std::allocator<char> > > > >, boost::regex_traits<char, boost::cpp_regex_t
    raits<char> > >::match_imp()]+0x15f): undefined reference to `boost::re_detail::
    verify_options(unsigned int, boost::regex_constants::_match_flags)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l12perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS6_EEENS_
    12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE18unwind_extra_blockEb[boost::re_det
    ail:LOLerl_matcher<__gnu_cxx::__normal_iterator<char const*, std::basic_string<ch
    ar, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_
    match<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::cha
    r_traits<char>, std::allocator<char> > > > >, boost::regex_traits<char, boost::c
    pp_regex_traits<char> > >::unwind_extra_block(bool)]+0x48): undefined reference
    to `boost::re_detail:LOLut_mem_block(void*)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l11raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_trait
    sIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE[void boost::re_detail::raise_e
    rror<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_trai
    ts<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_
    regex_traits<char> > > const&, boost::regex_constants::error_type)]+0x47): undef
    ined reference to `boost::re_detail::raise_runtime_error(std::runtime_error cons
    t&)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l18basic_regex_parserIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE4failENS_1
    5regex_constants10error_typeEiSsi[boost::re_detail::basic_regex_parser<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::fail(boost::regex_cons
    tants::error_type, int, std::basic_string<char, std::char_traits<char>, std::all
    ocator<char> >, int)]+0x214): undefined reference to `boost::regex_error::regex_
    error(std::string const&, boost::regex_constants::error_type, int)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l18basic_regex_parserIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE4failENS_1
    5regex_constants10error_typeEiSsi[boost::re_detail::basic_regex_parser<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::fail(boost::regex_cons
    tants::error_type, int, std::basic_string<char, std::char_traits<char>, std::all
    ocator<char> >, int)]+0x21f): undefined reference to `boost::regex_error::raise(
    ) const'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l18basic_regex_parserIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE4failENS_1
    5regex_constants10error_typeEiSsi[boost::re_detail::basic_regex_parser<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::fail(boost::regex_cons
    tants::error_type, int, std::basic_string<char, std::char_traits<char>, std::all
    ocator<char> >, int)]+0x22a): undefined reference to `boost::regex_error::~regex
    _error()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l18basic_regex_parserIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE4failENS_1
    5regex_constants10error_typeEiSsi[boost::re_detail::basic_regex_parser<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::fail(boost::regex_cons
    tants::error_type, int, std::basic_string<char, std::char_traits<char>, std::all
    ocator<char> >, int)]+0x285): undefined reference to `boost::regex_error::~regex
    _error()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE16fixup_r
    ecursionsEPNS0_14re_syntax_baseE[boost::re_detail::basic_regex_creator<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::fixup_recursions(boost
    ::re_detail::re_syntax_base*)]+0x109): undefined reference to `boost::regex_erro
    r::regex_error(std::string const&, boost::regex_constants::error_type, int)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE16fixup_r
    ecursionsEPNS0_14re_syntax_baseE[boost::re_detail::basic_regex_creator<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::fixup_recursions(boost
    ::re_detail::re_syntax_base*)]+0x114): undefined reference to `boost::regex_erro
    r::raise() const'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE16fixup_r
    ecursionsEPNS0_14re_syntax_baseE[boost::re_detail::basic_regex_creator<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::fixup_recursions(boost
    ::re_detail::re_syntax_base*)]+0x11f): undefined reference to `boost::regex_erro
    r::~regex_error()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE16fixup_r
    ecursionsEPNS0_14re_syntax_baseE[boost::re_detail::basic_regex_creator<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::fixup_recursions(boost
    ::re_detail::re_syntax_base*)]+0x2df): undefined reference to `boost::regex_erro
    r::regex_error(std::string const&, boost::regex_constants::error_type, int)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE16fixup_r
    ecursionsEPNS0_14re_syntax_baseE[boost::re_detail::basic_regex_creator<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::fixup_recursions(boost
    ::re_detail::re_syntax_base*)]+0x2ea): undefined reference to `boost::regex_erro
    r::raise() const'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE16fixup_r
    ecursionsEPNS0_14re_syntax_baseE[boost::re_detail::basic_regex_creator<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::fixup_recursions(boost
    ::re_detail::re_syntax_base*)]+0x2f5): undefined reference to `boost::regex_erro
    r::~regex_error()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE16fixup_r
    ecursionsEPNS0_14re_syntax_baseE[boost::re_detail::basic_regex_creator<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::fixup_recursions(boost
    ::re_detail::re_syntax_base*)]+0x344): undefined reference to `boost::regex_erro
    r::~regex_error()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE16fixup_r
    ecursionsEPNS0_14re_syntax_baseE[boost::re_detail::basic_regex_creator<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::fixup_recursions(boost
    ::re_detail::re_syntax_base*)]+0x381): undefined reference to `boost::regex_erro
    r::~regex_error()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE16create_
    startmapsEPNS0_14re_syntax_baseE[boost::re_detail::basic_regex_creator<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::create_startmaps(boost
    ::re_detail::re_syntax_base*)]+0x150): undefined reference to `boost::regex_erro
    r::regex_error(std::string const&, boost::regex_constants::error_type, int)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE16create_
    startmapsEPNS0_14re_syntax_baseE[boost::re_detail::basic_regex_creator<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::create_startmaps(boost
    ::re_detail::re_syntax_base*)]+0x15b): undefined reference to `boost::regex_erro
    r::raise() const'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE16create_
    startmapsEPNS0_14re_syntax_baseE[boost::re_detail::basic_regex_creator<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::create_startmaps(boost
    ::re_detail::re_syntax_base*)]+0x166): undefined reference to `boost::regex_erro
    r::~regex_error()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE16create_
    startmapsEPNS0_14re_syntax_baseE[boost::re_detail::basic_regex_creator<char, boo
    st::regex_traits<char, boost::cpp_regex_traits<char> > >::create_startmaps(boost
    ::re_detail::re_syntax_base*)]+0x30f): undefined reference to `boost::regex_erro
    r::~regex_error()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE15create_
    startmapEPNS0_14re_syntax_baseEPhPjh[boost::re_detail::basic_regex_creator<char,
     boost::regex_traits<char, boost::cpp_regex_traits<char> > >::create_startmap(bo
    ost::re_detail::re_syntax_base*, unsigned char*, unsigned int*, unsigned char)]+
    0x284): undefined reference to `boost::regex_error::regex_error(std::string cons
    t&, boost::regex_constants::error_type, int)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE15create_
    startmapEPNS0_14re_syntax_baseEPhPjh[boost::re_detail::basic_regex_creator<char,
     boost::regex_traits<char, boost::cpp_regex_traits<char> > >::create_startmap(bo
    ost::re_detail::re_syntax_base*, unsigned char*, unsigned int*, unsigned char)]+
    0x28f): undefined reference to `boost::regex_error::raise() const'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE15create_
    startmapEPNS0_14re_syntax_baseEPhPjh[boost::re_detail::basic_regex_creator<char,
     boost::regex_traits<char, boost::cpp_regex_traits<char> > >::create_startmap(bo
    ost::re_detail::re_syntax_base*, unsigned char*, unsigned int*, unsigned char)]+
    0x29a): undefined reference to `boost::regex_error::~regex_error()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE15create_
    startmapEPNS0_14re_syntax_baseEPhPjh[boost::re_detail::basic_regex_creator<char,
     boost::regex_traits<char, boost::cpp_regex_traits<char> > >::create_startmap(bo
    ost::re_detail::re_syntax_base*, unsigned char*, unsigned int*, unsigned char)]+
    0x9f2): undefined reference to `boost::regex_error::~regex_error()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l12perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS6_EEENS_
    12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE12extend_stackEv[boost::re_detail:LOL
    erl_matcher<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, st
    d::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<
    __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_trai
    ts<char>, std::allocator<char> > > > >, boost::regex_traits<char, boost::cpp_reg
    ex_traits<char> > >::extend_stack()]+0x20): undefined reference to `boost::re_de
    tail::get_mem_block()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZNK5boost9re_deta
    il31cpp_regex_traits_implementationIcE12error_stringENS_15regex_constants10error
    _typeE[boost::re_detail::cpp_regex_traits_implementation<char>::error_string(boo
    st::regex_constants::error_type) const]+0x83): undefined reference to `boost::re
    _detail::get_default_error_string(boost::regex_constants::error_type)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZNK5boost9re_deta
    il31cpp_regex_traits_implementationIcE12error_stringENS_15regex_constants10error
    _typeE[boost::re_detail::cpp_regex_traits_implementation<char>::error_string(boo
    st::regex_constants::error_type) const]+0xe1): undefined reference to `boost::re
    _detail::get_default_error_string(boost::regex_constants::error_type)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l19basic_regex_creatorIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE12insert_
    stateEiNS0_19syntax_element_typeEj[boost::re_detail::basic_regex_creator<char, b
    oost::regex_traits<char, boost::cpp_regex_traits<char> > >::insert_state(int, bo
    ost::re_detail::syntax_element_type, unsigned int)]+0x94): undefined reference t
    o `boost::re_detail::raw_storage::insert(unsigned int, unsigned int)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost12object_
    cacheINS_9re_detail21cpp_regex_traits_baseIcEENS1_31cpp_regex_traits_implementat
    ionIcEEE3getERKS3_j[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 int)]+0x1e): undefined refe
    rence to `boost::scoped_static_mutex_lock::scoped_static_mutex_lock(boost::stati
    c_mutex&, bool)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost12object_
    cacheINS_9re_detail21cpp_regex_traits_baseIcEENS1_31cpp_regex_traits_implementat
    ionIcEEE3getERKS3_j[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 int)]+0x59): undefined refe
    rence to `boost::scoped_static_mutex_lock::~scoped_static_mutex_lock()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost12object_
    cacheINS_9re_detail21cpp_regex_traits_baseIcEENS1_31cpp_regex_traits_implementat
    ionIcEEE3getERKS3_j[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 int)]+0xdf): undefined refe
    rence to `boost::scoped_static_mutex_lock::~scoped_static_mutex_lock()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZNK5boost9re_deta
    il31cpp_regex_traits_implementationIcE18lookup_collatenameEPKcS4_[boost::re_deta
    il::cpp_regex_traits_implementation<char>::lookup_collatename(char const*, char
    const*) const]+0x10f): undefined reference to `boost::re_detail::lookup_default_
    collate_name(std::string const&)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l31cpp_regex_traits_implementationIcE4initEv[boost::re_detail::cpp_regex_traits_
    implementation<char>::init()]+0xdd): undefined reference to `boost::re_detail::r
    aise_runtime_error(std::runtime_error const&)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost9re_detai
    l31cpp_regex_traits_implementationIcE4initEv[boost::re_detail::cpp_regex_traits_
    implementation<char>::init()]+0x114): undefined reference to `boost::re_detail::
    get_default_error_string(boost::regex_constants::error_type)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost16cpp_reg
    ex_traitsIcE16get_catalog_nameEv[boost::cpp_regex_traits<char>::get_catalog_name
    ()]+0x1f): undefined reference to `boost::scoped_static_mutex_lock::scoped_stati
    c_mutex_lock(boost::static_mutex&, bool)'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost16cpp_reg
    ex_traitsIcE16get_catalog_nameEv[boost::cpp_regex_traits<char>::get_catalog_name
    ()]+0x3e): undefined reference to `boost::scoped_static_mutex_lock::~scoped_stat
    ic_mutex_lock()'
    C:\Users\LOL\AppData\Local\Temp\cc5qV0sG.o:main.cpp:(.text$_ZN5boost16cpp_reg
    ex_traitsIcE16get_catalog_nameEv[boost::cpp_regex_traits<char>::get_catalog_name
    ()]+0x56): undefined reference to `boost::scoped_static_mutex_lock::~scoped_stat
    ic_mutex_lock()'
    collect2: ld returned 1 exit status
    
    D:\EigeneProgramme\BoostTest>pause
    Drücken Sie eine beliebige Taste . . .
    

    Wobei LOL für meine Namen steht.

    Ich habe bis jetzt versucht, das ganze mit

    toolset=mingw
    

    zu machen, wobei jedoch nur *.a Dateien entstanden, welche ich jedoch unter Windows nicht verwenden konnte. Also habe ich das ganze mit

    toolset=msvc-10.0
    

    versucht, wobei dann auch *.lib Dateien entstanden.

    Danke schon mal im Voraus. Ich hoffe es ist nicht nur irgendein vollkommen dummer Fehler 😃 .



  • wobei jedoch nur *.a Dateien entstanden, welche ich jedoch unter Windows nicht verwenden konnte.

    Doch, für MinGW brauchst du *.a Dateien.
    P.S.: Wenn du Boost nicht selber kompilieren willst, gibt es auch vorkompilierte Versionen davon im Netz. Willste einen Link?



  • Hi,
    Ja, der Link wäre sehr nett. Es würde mir aber auch reichen, wenn du mir sagst, wie ich die *.a Dateien verwende. Denn bei den *.a Dateien "sagte" mir g++ immer, es hätte die Dateien nicht gefunden. Danke für deine Antwort.



  • Hi,
    Ich kompiliere grade noch mal mit:

    cd /d %BOOST_ROOT%
    bootstrap mingw
    bjam --build-type=complete --toolset=gcc install
    

    Die *.a Dateien, welche ich für das obige Beispiel brauche, wurde schon generiert.
    Nun also mit

    SET BINDIR=D:/EigeneProgramme/BoostTest 
    CD /D "D:/EigeneProgramme/BoostTest"
    g++ main.cpp -I "%BOOST_ROOT%" -L "%BOOST_ROOT%\lib" -o example.exe -libboost_regex-mgw46-mt-1_52
    pause
    

    kompiliert und nun habe ich "wieder" den Fehler

    C:\Windows\system32>SET BINDIR=D:/EigeneProgramme/BoostTest
    
    C:\Windows\system32>CD /D "D:/EigeneProgramme/BoostTest"
    
    D:\EigeneProgramme\BoostTest>g++ main.cpp -I "C:\Boost" -L "C:\Boost\lib" -o exa
    mple.exe -libboost_regex-mgw46-mt-1_52
    c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: cannot fin
    d -libboost_regex-mgw46-mt-1_52 
    collect2: ld returned 1 exit status
    
    D:\EigeneProgramme\BoostTest>pause
    Drücken Sie eine beliebige Taste . . .
    

    Der Ordnerinhalt von %BOOST_ROOT%\lib ist aber:

    C:\Boost\lib>dir
     Datenträger in Laufwerk C: ist Windows
     Volumeseriennummer: F657-48C2
    
     Verzeichnis von C:\Boost\lib
    
    02.12.2012  00:38    <DIR>          .
    02.12.2012  00:38    <DIR>          ..
    02.12.2012  00:36           126.028 libboost_chrono-mgw46-1_52.a
    02.12.2012  00:29           489.258 libboost_chrono-mgw46-d-1_52.a
    02.12.2012  00:23           126.028 libboost_chrono-mgw46-mt-1_52.a
    02.12.2012  00:36           140.548 libboost_date_time-mgw46-1_52.a
    02.12.2012  00:30           500.602 libboost_date_time-mgw46-d-1_52.a
    02.12.2012  00:23           140.548 libboost_date_time-mgw46-mt-1_52.a
    02.12.2012  00:36           217.154 libboost_filesystem-mgw46-1_52.a
    02.12.2012  00:30         1.116.986 libboost_filesystem-mgw46-d-1_52.a
    02.12.2012  00:23           217.154 libboost_filesystem-mgw46-mt-1_52.a
    02.12.2012  00:37         1.000.666 libboost_graph-mgw46-1_52.a
    02.12.2012  00:31         7.346.370 libboost_graph-mgw46-d-1_52.a
    02.12.2012  00:24         1.000.666 libboost_graph-mgw46-mt-1_52.a
    02.12.2012  00:37           150.912 libboost_iostreams-mgw46-1_52.a
    02.12.2012  00:31           456.682 libboost_iostreams-mgw46-d-1_52.a
    02.12.2012  00:24           150.912 libboost_iostreams-mgw46-mt-1_52.a
    02.12.2012  00:24         1.579.716 libboost_locale-mgw46-mt-1_52.a
    02.12.2012  00:33         4.419.902 libboost_math_c99-mgw46-d-1_52.a
    02.12.2012  00:26           873.042 libboost_math_c99-mgw46-mt-1_52.a
    02.12.2012  00:33         4.295.274 libboost_math_c99f-mgw46-d-1_52.a
    02.12.2012  00:27           757.402 libboost_math_c99f-mgw46-mt-1_52.a
    02.12.2012  00:33         4.191.018 libboost_math_c99l-mgw46-d-1_52.a
    02.12.2012  00:27           783.744 libboost_math_c99l-mgw46-mt-1_52.a
    02.12.2012  00:38         3.173.060 libboost_math_tr1-mgw46-1_52.a
    02.12.2012  00:31        13.864.144 libboost_math_tr1-mgw46-d-1_52.a
    02.12.2012  00:25         3.173.060 libboost_math_tr1-mgw46-mt-1_52.a
    02.12.2012  00:32        14.622.794 libboost_math_tr1f-mgw46-d-1_52.a
    02.12.2012  00:25         3.287.442 libboost_math_tr1f-mgw46-mt-1_52.a
    02.12.2012  00:32        13.634.168 libboost_math_tr1l-mgw46-d-1_52.a
    02.12.2012  00:26         3.218.958 libboost_math_tr1l-mgw46-mt-1_52.a
    02.12.2012  00:35           296.590 libboost_prg_exec_monitor-mgw46-d-1_52.a
    02.12.2012  00:28            36.390 libboost_prg_exec_monitor-mgw46-mt-1_52.a
    02.12.2012  00:33         6.827.580 libboost_program_options-mgw46-d-1_52.a
    02.12.2012  00:27         1.241.446 libboost_program_options-mgw46-mt-1_52.a
    02.12.2012  00:34            62.858 libboost_random-mgw46-d-1_52.a
    02.12.2012  00:27            10.088 libboost_random-mgw46-mt-1_52.a
    02.12.2012  00:37         1.555.338 libboost_regex-mgw46-1_52.a 
    02.12.2012  00:30         8.654.442 libboost_regex-mgw46-d-1_52.a
    02.12.2012  00:23         1.555.338 libboost_regex-mgw46-mt-1_52.a
    02.12.2012  00:34        11.126.790 libboost_serialization-mgw46-d-1_52.a
    02.12.2012  00:28         1.436.820 libboost_serialization-mgw46-mt-1_52.a
    02.12.2012  00:34         1.329.424 libboost_signals-mgw46-d-1_52.a
    02.12.2012  00:28           206.434 libboost_signals-mgw46-mt-1_52.a
    02.12.2012  00:36            21.538 libboost_system-mgw46-1_52.a
    02.12.2012  00:29            68.146 libboost_system-mgw46-d-1_52.a
    02.12.2012  00:23            21.538 libboost_system-mgw46-mt-1_52.a
    02.12.2012  00:29           283.032 libboost_thread-mgw46-mt-1_52.a
    02.12.2012  00:35           146.454 libboost_timer-mgw46-d-1_52.a
    02.12.2012  00:29            27.056 libboost_timer-mgw46-mt-1_52.a
    02.12.2012  00:35        11.069.326 libboost_unit_test_framework-mgw46-d-1_52.a
    02.12.2012  00:29         1.625.294 libboost_unit_test_framework-mgw46-mt-1_52.a
    
    02.12.2012  00:36        48.675.798 libboost_wave-mgw46-d-1_52.a
    02.12.2012  00:29         4.632.910 libboost_wave-mgw46-mt-1_52.a
    02.12.2012  00:34         8.144.190 libboost_wserialization-mgw46-d-1_52.a
    02.12.2012  00:28           988.036 libboost_wserialization-mgw46-mt-1_52.a
                  54 Datei(en),    195.097.094 Bytes
                   2 Verzeichnis(se), 17.589.477.376 Bytes frei
    

    Kurz: "libboost_regex-mgw46-mt-1_52" existiert 😕



  • Muss es nicht -llibboost_regex-mgw46-mt-1_52**.a** heißen?



  • DragonRaider schrieb:

    Hi,
    Ja, der Link wäre sehr nett. Es würde mir aber auch reichen, wenn du mir sagst, wie ich die *.a Dateien verwende. Denn bei den *.a Dateien "sagte" mir g++ immer, es hätte die Dateien nicht gefunden. Danke für deine Antwort.

    Hmm. Dann übergibst du wohl den Pfad falsch. Denn bei mir gibt es nur .a Dateien und das klappt wunderbar.
    Ich benutze übrigens eine IDE - CodeBlocks - die macht das übergeben für mich automatisch, deswegen kann ich nicht beurteilen ob deine Kommandozeilen-Parameter richtig sind...

    P.S.: Du brauchst den Link nicht. Die .a Dateien sind schon richtig.



  • Hi Leute,
    Danke für eure Hilfe. Ich mache das ganze jetzt mit CodeBlocks, welches ich sowieso schon installiert hatte, es aber bis jetzt nur zum schreiben des Quellcodes genutzt habe. Wenn ich mal wieder ein bisschen Zeit habe, mache ich dazu auch ein Youtube Video auf Deutsch(falls noch nicht vorhanden).



  • DragonRaider schrieb:

    (falls noch nicht vorhanden).

    Locker schon 😃



  • Hi Leute,
    Hab diesen Thread gerade noch mal raus gekramt 😉 Ich bin auf Windows 8 umgestiegen(Betriebssystem der Zukunft und so xD von wegen...) und da, mit der neuen CMD, bekomme/bekam ich(hab das schon vor einiger Zeit versucht) relativ komische Fehler (das er ganz normale CMD Befehle nicht gefunden hätte), und wollte deshalb hier nochmal nach dem Link fragen...??? Sorry schon mal, falls ich ihn bei Google übersehen hab 😉
    MfG
    DragonRaider





  • Für solche Dinge bitte immer einen neuen Thread eröffnen. Alte Threads "rausgraben" ist eine allgemein als Trollaktivität eingestufte Sache.



  • Sone schrieb:

    Für solche Dinge bitte immer einen neuen Thread eröffnen. Alte Threads "rausgraben" ist eine allgemein als Trollaktivität eingestufte Sache.

    In dem Fall ist es doch OK. Der Thread gehört ihm und ist noch keine Jahre alt.



  • out schrieb:

    In dem Fall ist es doch OK. Der Thread gehört ihm und ist noch keine Jahre alt.

    Du hast Recht. 🙂

    das er ganz normale CMD Befehle nicht gefunden hätte

    Ich denke, du hast die Umgebungsvariable PATH verändert. So mal ins Blaue geschossen.
    (Kann natürlich auch an Windows 8 liegen, davon habe ich keine Ahnung, vielleicht wurden einige Befehle ja umbenannt o.ä. . Aber ich hab mal auf einem frisch installiertem Windows 8 dxdiag und ipconfig ausprobiert, hat AFAIR funktioniert...



  • Hi Sone,
    An der PATH Variable sollte es nicht liegen, da ich mit der schon öfter Probleme hatte und sie jetzt fein säuberlich verwalte, außerdem lag es ja nicht daran, dass er z.B. g++ nicht gefunden hätte.
    Ich dachte mir nur so, dass vielleicht jemand zufälligerweise dieses Problem und auch die Lösung dazu kennt.
    Ich wollte hier auch niemanden trollen(langsam verstehe ich auch nicht mehr, was alle immer damit haben, das wird ja andauernd in den verschiedensten Zusammenhänge genutzt) oder so, ich war nur gerade dabei mir alle meine Threads + Beiträge anzugucken(falls ich vergessen haben sollte, Danke zu sagen oder so etwas).
    MfG
    DragonRaider



  • Hmm, wieso machst du dir das Leben nicht einfacher mit VS2011 Express oder VS2010 Express, und nimmst dann einen boost-Installer und alles geht leicht von der Hand. 🙂



  • Weil ich mit dem Visual Studio "Krams" einfach nicht zurecht komme 😉



  • DragonRaider schrieb:

    Weil ich mit dem Visual Studio "Krams" einfach nicht zurecht komme 😉

    z.B.?



  • Mit der ganzen IDE... Ich schaffe es noch nicht mal, ein Projekt richtig ein zu richten bzw. libs ein zu binden etc. Und was soll diese "stdafx.h"? Auch mag ich das Einrücken des Visual Studios nicht, ich bevorzuge

    if(statement)
      {
      doAnything();
      }
    

    vor(/zu)

    if(statement){
        doAnything();
        }
    

    und und und... Vielleicht habe ich mich auch einfach an Code::Blocks gewöhnt, wer weiß, aber mir persönlich gefällt Code::Blocks einfach besser.
    MfG
    DragonRaider


Anmelden zum Antworten