博客园  :: 首页  :: 联系 :: 管理

VS2008中编译 ptlib 2.2.1

Posted on 2008-05-16 09:58  sunrack  阅读(889)  评论(0编辑  收藏  举报
一、拷贝 tools 到 C:\

二、添加搜索环境变量

PTLIB_CONFIGURE_OPTIONS
--extern-dir='C:\program files\Microsoft Visual Studio 9.0'

这样就不会搜索整个硬盘,速度快了很多

三、添加 C++ 路径

1、可执行文件
C:\tools
ptlib\lib

2、包含文件
ptlib\include

3、库文件
ptlib\lib

四、Release模式下编译
MergeSym

注:目前发现 url.cxx 编译不通过,暂时没有解决办法,只能注释掉以下代码:

//class PURLLegacyScheme_##schemeName : public PURLLegacyScheme \
//
//{ \
//
//  public: \
//
//    PURLLegacyScheme_##schemeName() \
//
//    : PURLLegacyScheme(#schemeName )  \
//
//    { \
//
//      hasUsername           = user; \
//
//      hasPassword           = pass; \
//
//      hasHostPort           = host; \
//
//      defaultToUserIfNoAt   = def; \
//
//      defaultHostToLocal    = defhost; \
//
//      hasQuery              = query; \
//
//      hasParameters         = params; \
//
//      hasFragments          = frags; \
//
//      hasPath               = path; \
//
//      relativeImpliesScheme = rel; \
//
//      defaultPort           = port; \
//
//    } \
//
//}; \
//
//  static PFactory<PURLScheme>::Worker<PURLLegacyScheme_##schemeName> schemeName##Factory(#schemeName, true); \
//


五、Debug模式下编译DLL
     Release模式下编译DLL