Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Boost Libraries failing to work with g++ 3.3.2, but working with 3.4.5

Reply
Thread Tools

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

 
 
ambarish.mitra@gmail.com
Guest
Posts: n/a
 
      07-19-2007
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

 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      07-19-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) 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


 
Reply With Quote
 
 
 
 
James Kanze
Guest
Posts: n/a
 
      07-20-2007
On Jul 19, 2:22 pm, "Victor Bazarov" <(E-Mail Removed)> wrote:
> (E-Mail Removed) 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:(E-Mail Removed)
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

 
Reply With Quote
 
Bernd Strieder
Guest
Posts: n/a
 
      07-20-2007
Hello,

(E-Mail Removed) 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Boost::any and boost::lambda with std::find_if Misiu C++ 3 01-31-2007 05:46 PM
#include <boost/shared_ptr.hpp> or #include "boost/shared_ptr.hpp"? Colin Caughie C++ 1 08-29-2006 02:19 PM
Problems mixing boost::lambda::bind and boost::shared_ptr.. Toby Bradshaw C++ 6 06-02-2006 04:12 PM
Any Boost Experts out there for Boost.Regex? Richard Latter C++ 2 05-17-2004 03:12 PM
Boost + Python C/API: Mixing python return types with boost return types Steve Knight Python 2 10-10-2003 10:11 AM



Advertisments