【发布时间】:2013-01-31 18:32:10
【问题描述】:
当我尝试使用以下行编译代码时:(我使用的是boost 1.51,gcc 4.6.3 在UBuntu 12.04 LTS 64 bits 中)
#include <boost/date_time/posix_time/posix_time.hpp>
dotFile << "// " << boost::posix_time::second_clock::local_time() << std::endl;
我收到此错误:
sources/sctg/src/main.cc: In function 'void printDot(sctg::Configuration*, std::string, std::vector<sctg::Task*>*, std::vector<sctg::Event*>*)':
sources/sctg/src/main.cc:1029:31: error: 'boost::posix_time' has not been declared
知道怎么解决吗?
【问题讨论】:
-
尝试使用引号而不是括号:
#include "boost/date_time/posix_time/posix_time.hpp" -
谢谢,但没用。