cygwin - 如何用 cygwin 编译 Poco?
问题描述
我已经从镜像站点下载了 POCO,并且在编译时它无法链接库?例子
#include "Poco/Timestamp.h"
#include<iostream>
#include <ctime>
using Poco::Timestamp;
int main(int argc, char** argv)
{
Timestamp now; // the current date and time
std::time_t t1 = now.epochTime(); // convert to time_t ...
Timestamp ts1(Timestamp::fromEpochTime(t1)); // ... and back again
for (int i = 0; i < 100000; ++i) ; // wait a bit
Timestamp::TimeDiff diff = now.elapsed(); // how long did it take?
Timestamp start(now); // save start time
now.update(); // update with current
time
diff = now - start; // again, how long?
return 0;
}
编译错误
$ g++ pocoDemo.cpp
pocoDemo.cpp:1:10: fatal error: Poco/Timestamp.h: No such file or directory
compilation terminated.
解决方案
推荐阅读
- regex - 如何替换包含另一个子字符串的行中的子字符串
- c# - 如何处理视图依赖于 MVVM 上下文中的多个模型的情况?
- rest - 我们如何使用 Google Fit rest API 获取当天的实时步数?
- java - 如何自动让我的应用程序在一组图像之间转换并从第一个元素重新开始?
- javascript - 如何重定向文本字段输入去表单提交的命令而不是按钮中间表单?
- spring - Spring data mongo - 获取对象数组的总和
- python-3.x - 如何在mongodb中搜索字段的特定动态模式。?
- python - 使用 Flask 运行 keras 预测会出错
- python - 如何使用其他数据框中的列值生成数据框
- ui-testing - Firebase 仪器测试超时