Boost 1.48
GCC 4.2.4
AIX 5.3 PowerPC
I have a C app that I have been told to port to C++ and I now have a need to use regex. So since XMAS I have been learning C++ (And actually really loving it, not seen the wife in weeks tbh). So, I have to port an app over to AIX 5.3 using GCC. I am only using boost for the regex. I have a simple test example that compiles and runs fine, but when compiling I get these warnings. Can anyone advise on a) are they safe to ignore b)If not then what am I doing wrong c) Does anyone thing that strong coffee and late nights is a good plan for learning C++?
Here is the example:
#include
#include
bool isPluginPresent(const std::string& s)
{
static const boost::regex e("^(Plugin|area-Hub-Plugin):\s*(.*arealdap.+)$", boost::regex::perl|boost::regex::icase);
return boost::regex_match(s, e);
}
#include <iostream>
using namespace std;
int main()
{
string s[6] = { "Pluuuugin: c:\\program files\\nextid.dll",
"Plugin: c:\\program files\\areahub.dll",
"AREA-Hub-Plugin: c:\\program files\\arealdap.so",
"AREA-Hub-Plugin: c:\\program files\\someother.so",
"Hello World: I really should go to bed",
"Plugin: c:\\program files\\arealdap.so",};
int i;
for(i = 0; i < 6; ++i)
{
cout << "isPluginPresent " << s[i] << " returned " << isPluginPresent(s[i]) << endl;
}
return 0;
}
Compiled with
g++ -I /home/smurff/boost_1_48_0 -lpthreads example.cpp -o example /usr/local/lib/libboost_regex.a
And the warnings are a whole bunch like this:
ld: 0711-224 WARNING: Duplicate symbol: .non-virtual thunk to boost::exception_detail::error_info_injector::~error_info_injector()
Thanks for your time
Danny
a) Yes, they are safe to ignore. I compiled your code in my box and it is fine (check your \s escape sequence). So the warnings you are getting are likely to be caused by your compiler version or platform. You might try to upgrade those.
b) —
c) (Have you asked your wife?)