By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,046 Members | 2,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,046 IT Pros & Developers. It's quick & easy.

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

P: n/a
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 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
am************@gmail.com 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
Jul 19 '07 #2

P: n/a
On Jul 19, 2:22 pm, "Victor Bazarov" <v.Abaza...@comAcast.netwrote:
ambarish.mi...@gmail.com 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:ja*********@gmail.com
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

Jul 20 '07 #3

P: n/a
Hello,

am************@gmail.com 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

Jul 20 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.