BoostRegex-在AIX5.3上,简单测试会给出多个ld:0711-224警告

BoostRegex - on AIX 5.3 Simple test gives multiple ld: 0711-224 WARNING

本文关键字:ld 警告 0711-224 AIX5 测试 简单 BoostRegex-      更新时间:2023-10-16

升压1.48GCC 4.2.4AIX 5.3 PowerPC

我有一个C应用程序,我被告知要将其移植到C++,现在我需要使用regex。所以从XMAS开始,我就一直在学习C++(实际上我真的很喜欢它,好几个星期没见到妻子了)。因此,我必须使用GCC将一个应用程序移植到AIX5.3。我只对正则表达式使用boost。我有一个简单的测试示例,它编译并运行良好,但在编译时会收到这些警告。有人能建议a)他们可以忽略吗b)如果没有,那么我做错了什么c)有人认为浓咖啡和深夜是学习c++的好计划吗?

以下是示例:#包括#包括

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;
}

编译者g++-I/home/smurff/boost_1_48_0-lpthreads example.cpp-o example/usr/local/lib/libboost_regex.a

警告是这样的:

ld:00711-224警告:重复的符号:.要提升的非虚拟thunk::exception_detail::error_info_injector::~error_info_injector()

谢谢你抽出时间Danny

a)是的,可以安全地忽略它们。我在我的盒子里编译了你的代码,它很好(检查你的转义序列)。因此,您收到的警告很可能是由编译器版本或平台引起的。您可以尝试升级这些。

b) --

c) (你问过你妻子吗?)