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

A

ambarish.mitra

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
 
V

Victor Bazarov

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
 
J

James Kanze

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.
 
B

Bernd Strieder

Hello,
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top