【发布时间】:2014-11-07 14:01:07
【问题描述】:
在尝试编译 gnu plot 示例时,g++ 编译器抱怨它找不到位于 /usr/include/boost 中的 boost 库。
准确地说:
致命错误:boost:没有这样的文件或目录#include
我已经使用了命令
g++ -l /usr/include/boost -Wall -std=c++11 -lboost_iostreams exampleplot.cpp -o exampleplot.out
也试过g++ -I /usr/include/boost/* -Wall -std=c++11 -lboost_iostreams exampleplot.cpp -o exampleplot.out
这是我的包括:
#include <iostream>
#include <cstring>
#include <vector>
#include<cmath>
#include<algorithm>
#include "gnuplot-iostream.h"
#include <boost>
谁能告诉我出了什么问题并建议如何解决?
【问题讨论】:
-
没有
boost文件。 -
<boost>不是标准库。请参阅here 了解如何包含您要使用的标头。