我已经通过Ubuntu 12.04中的软件中心安装了libgoogle-perftools-dev。如http://pj.freefaculty.org/blog/?p=140所建议,我想添加到我的cpp文件中:
#include <gperftools/profiler.h>
但是编译器说
gperftools/profiler.h: No such file or directory
我试图找到它在哪里:
$ locate -i gperftools
没有回报,并且
$ locate -i "profiler.h"
退货
/usr/include/c++/4.6/profile/impl/profiler.h
/usr/src/linux-headers-3.2.0-23-generic-pae/include/config/function/profiler.h
我不确定是否适合gperftools
。
所以我想知道如何找到
该locate
命令的问题可能是尚未更新数据库以反映新安装的软件包文件。您可以强制执行更新(sudo updatedb
)或使用find
命令,但是在像Ubuntu这样的使用dpkg
软件包管理工具的系统上,最简单的解决方案是列出软件包内容
dpkg -L libgoogle-perftools-dev
或profiler.h
专门检查文件位置
dpkg -L libgoogle-perftools-dev | grep 'profiler.h'
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句