Boost Libraries failing to work with g++ 3.3.2, but working with 3.4.5

Discussion in 'C++' started by ambarish.mitra@gmail.com, Jul 19, 2007.

  1. Guest

    Code snippet:

    #include <iostream>
    #include <string>
    #include <boost/regex.hpp> // Boost.Regex lib

    using namespace std;

    int main( )
    {
    std::string s, sre;
    boost::regex re;

    ....
    try
    {
    // Set up the regular expression for case-insensitivity
    re.assign(sre, boost::regex_constants::icase);
    }
    // catch (boost::regex_error& e)
    catch (...)
    {
    cout << sre << " is not a valid regular expression: \"" <<
    endl;
    continue;
    }
    ...
    }

    This code snippet builds well with GCC g++ 3.4.5, but fails to link on
    g++ 3.3.2, error being something to do with basic strings.

    Is there any workaround on 3.3.2 - this is the one I have to use. I am
    on boost 1.32
     
    , Jul 19, 2007
    #1
    1. Advertising

  2. wrote:
    > Code snippet:
    >
    > [..snip..]
    >
    > This code snippet builds well with GCC g++ 3.4.5, but fails to link on
    > g++ 3.3.2, error being something to do with basic strings.
    >
    > Is there any workaround on 3.3.2 - this is the one I have to use. I am
    > on boost 1.32


    Wrong place to ask.

    Boost has its own discussion forums, please go there and ask. Also,
    consider 'gnu.g++.help' for your GNU-specific questions.

    V
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask
     
    Victor Bazarov, Jul 19, 2007
    #2
    1. Advertising

  3. James Kanze Guest

    On Jul 19, 2:22 pm, "Victor Bazarov" <> wrote:
    > wrote:
    > > Code snippet:


    > > [..snip..]


    > > This code snippet builds well with GCC g++ 3.4.5, but fails to link on
    > > g++ 3.3.2, error being something to do with basic strings.


    > > Is there any workaround on 3.3.2 - this is the one I have to use. I am
    > > on boost 1.32


    > Wrong place to ask.


    Not according to the charter of the group. Not according to the
    C++ standards committee either: boost::regex was adopted as
    TR-2, and will be in the next version of the standard.

    It's probable that he will get better or more information from
    the boost mailing list, but the question is perfectly on topic
    here.

    --
    James Kanze (GABI Software) email:
    Conseils en informatique orientée objet/
    Beratung in objektorientierter Datenverarbeitung
    9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
     
    James Kanze, Jul 20, 2007
    #3
  4. Hello,

    wrote:

    > This code snippet builds well with GCC g++ 3.4.5, but fails to link on
    > g++ 3.3.2, error being something to do with basic strings.
    >
    > Is there any workaround on 3.3.2 - this is the one I have to use. I am
    > on boost 1.32


    You need to build boost libraries twice, once with g++-3.3.2 and another
    times with 3.4.5, because there have been changes in the ABI between
    g++-3.3.2 and 3.4.5, preventing code compiled with one release to be
    linkable to code compiled by the other. If different compiler releases
    come into play, you always have to check, whether they are compatible,
    not only with g++.

    Bernd Strieder
     
    Bernd Strieder, Jul 20, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Richard Latter
    Replies:
    2
    Views:
    2,910
    Julie
    May 17, 2004
  2. Steve Knight
    Replies:
    2
    Views:
    765
    Steve Knight
    Oct 10, 2003
  3. Toby Bradshaw
    Replies:
    6
    Views:
    1,758
    Kai-Uwe Bux
    Jun 2, 2006
  4. Colin Caughie
    Replies:
    1
    Views:
    721
    Shooting
    Aug 29, 2006
  5. Misiu
    Replies:
    3
    Views:
    2,390
    Misiu
    Jan 31, 2007
Loading...

Share This Page