错误提示:fatal error C1083: 无法打开包括文件:“libconfig.h++”: No such file or directory

hamigua_12 2013-03-05 09:02:35
从网上下了一个别人的程序,运行不通过,提示这样的错误,求各位大牛帮忙看看啥情况啊????


错误提示:fatal error C1083: 无法打开包括文件:“libconfig.h++”: No such file or directory
...全文
888 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
tonforce 2013-03-05
  • 打赏
  • 举报
回复
呵呵,找到错误了? 解决了就好。
hamigua_12 2013-03-05
  • 打赏
  • 举报
回复
引用 8 楼 luciferisnotsatan 的回复:
#include "libconfig.h++"
嗯,是这里出错的
luciferisnotsatan 2013-03-05
  • 打赏
  • 举报
回复
#include "libconfig.h++"
hamigua_12 2013-03-05
  • 打赏
  • 举报
回复
#ifndef PARAMETERS_H_
#define PARAMETERS_H_

#include <string>
#include <vector>
#include <iostream>
#include <exception>
#include <cstdlib>
#include <libconfig.h++>

#include "cv.h"

class Parameters
{
public:
	Parameters(const std::string& confFile);
	virtual ~Parameters();

	int readIntParameter(std::string param_name) const;
	double readDoubleParameter(std::string param_name) const;
	std::string readStringParameter(std::string param_name) const;

	cv::Size readSizeParameter(std::string param_name) const;
	cv::Rect readRectParameter(std::string param_name) const;

	bool settingExists(std::string param_name) const;

protected:
	libconfig::Config m_configFile;
	std::string m_filename;

};

#endif // PARAMETERS_H_
hamigua_12 2013-03-05
  • 打赏
  • 举报
回复
这是出错的.h文件的代码
#ifndef PARAMETERS_H_
#define PARAMETERS_H_

#include <string>
#include <vector>
#include <iostream>
#include <exception>
#include <cstdlib>
#include <libconfig.h++>

#include "cv.h"

class Parameters
{
public:
	Parameters(const std::string& confFile);
	virtual ~Parameters();

	int readIntParameter(std::string param_name) const;
	double readDoubleParameter(std::string param_name) const;
	std::string readStringParameter(std::string param_name) const;

	cv::Size readSizeParameter(std::string param_name) const;
	cv::Rect readRectParameter(std::string param_name) const;

	bool settingExists(std::string param_name) const;

protected:
	libconfig::Config m_configFile;
	std::string m_filename;

};

#endif // PARAMETERS_H_
hamigua_12 2013-03-05
  • 打赏
  • 举报
回复
引用 3 楼 luciferisnotsatan 的回复:
可能你下的代码依赖了一个叫libconfig的库,也可能这是那作者自己写的,没上传。
去你下程序的那个页面再找找相关内容吧


引用 4 楼 tonforce 的回复:
我输入“libconfig”关键字在百度搜索了下,发现有很多解释
你可以试试,看看能不能找到符合你问题的解决方法。


嗯,libconfig是一个读写配置文件的库,我下载了一个,跟头文件放在一起(同目录下),但是还是编译出错,同样的错误,在2008中编译的
同时设置了链接器

但是还是出现同样的错误.....
tonforce 2013-03-05
  • 打赏
  • 举报
回复
引用 2 楼 hamigua_12 的回复:
引用 1 楼 ganpengjin1 的回复: 因为你缺少这个头文件,或者你应该把它的路径放正确,你看下你的头文件引入时什么路径就放到哪 请问这个libconfig是干什么用的
我输入“libconfig”关键字在百度搜索了下,发现有很多解释 你可以试试,看看能不能找到符合你问题的解决方法。
luciferisnotsatan 2013-03-05
  • 打赏
  • 举报
回复
引用 2 楼 hamigua_12 的回复:
引用 1 楼 ganpengjin1 的回复:因为你缺少这个头文件,或者你应该把它的路径放正确,你看下你的头文件引入时什么路径就放到哪 请问这个libconfig是干什么用的
可能你下的代码依赖了一个叫libconfig的库,也可能这是那作者自己写的,没上传。 去你下程序的那个页面再找找相关内容吧
hamigua_12 2013-03-05
  • 打赏
  • 举报
回复
引用 1 楼 ganpengjin1 的回复:
因为你缺少这个头文件,或者你应该把它的路径放正确,你看下你的头文件引入时什么路径就放到哪
请问这个libconfig是干什么用的
漫步者、 2013-03-05
  • 打赏
  • 举报
回复
因为你缺少这个头文件,或者你应该把它的路径放正确,你看下你的头文件引入时什么路径就放到哪

64,648

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧