现在的位置: 首页 > 综合 > 正文

POCO C++编译配置

2013年03月17日 ⁄ 综合 ⁄ 共 812字 ⁄ 字号 评论关闭
poco自动编译:
          1、poco文件夹下有一个build_vs90.cmd批处理文件,根据编译器的版本进行编译。如果需要NetSSL_OpenSSL得修改poco目录下的buildwin.cmd文件的38行设置openssl的安装目录,一般为C:\OpenSSL.
          
          2、点击运行build_vs90.cmd, 会在poco目录下生成一个/bin、/lib文件夹里面,/bin是一些dll文件, /lib是一些lib文件。
          3、在vs添加库的目录路径:
                                        包含文件中添加poco/Foundationinclude, 库文件添加生成的lib目录,把bin目录下的**.dll,  **d.dll文件拷贝到release, debug目录下。
           4、test:
#include "Poco/DateTime.h"
#include "Poco/DateTimeFormat.h"
using Poco::DateTime ;
using Poco::DateTimeFormat ;
int main(int argc, char **argv )
{
    DateTime now;
    std::cout << "Today is "
              << DateTimeFormat:: WEEKDAY_NAMES[ now. dayOfWeek()] << ", "
              << DateTimeFormat:: MONTH_NAMES[ now. month() - 1] << " "
              << now. day() << " - " << "day number "
              << now. dayOfYear() << " in " << now .year ()
              << " and day number " << (long ) now .julianDay () << " in the Julian calendar." << std ::endl ;
    system( "pause");
    return 0;
}

【上篇】
【下篇】

抱歉!评论已关闭.