包括其他头文件代码块中包含的头文件 [英] including header files included inside other header files Code Blocks

查看:111
本文介绍了包括其他头文件代码块中包含的头文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我正在尝试编译一个使用boost :: spirit库来解析使用代码块的ini文件的旧示例。这是:



使用精神库的INI文件阅读器[ ^ ]



我选择使用1.3.1精神版本。



在main.cpp文件中我有:



Hello,

I''m trying to compile an old example of using the boost::spirit library to parse an ini file using Code Blocks. Here it is:

INI file reader using the spirit library[^]

I have chosen to use the 1.3.1 spirit version.

In the main.cpp file I have:

#include "boost/spirit/spirit.hpp"





在上面的文件中:





In the above file:

//...
#ifndef SPIRIT_HPP
#define SPIRIT_HPP
#define SPIRIT_VERSION 0x1301

#include "boost/spirit/debug.hpp"
#include "boost/spirit/actions.hpp"
//...





spirit.hpp中包含的一些标题包含其他标题,依此类推。



错误是:boost / spirit / debug.hpp:没有这样的文件或目录。



所以代码块没有看到头文件包含在其他头文件中。



如何包含所有这些?



我在编译器和链接器选项卡中添加了boost / spirit目录的完整路径在''搜索目录''



Some of the headers included in spirit.hpp have other headers included inside them, and so on.

The error is: boost/spirit/debug.hpp: No such file or directory.

So Code Blocks doesn''t see header files included inside other header files.

How to include all of them?

I have added full paths to the boost/spirit directory in the compiler and linker tabs in ''Search Directories''

推荐答案

尝试将boost目录包含在编译器中,如下所示:.. \..\..\public \\ \\ boost_1_47_0,并在链接器选项卡中包含boost lib,如下所示:.. \..\..\public\boost_1_47_0 \stage \lib。我希望这对你有用,祝你好运!
Try to include the boost directory in the compiler like this: ..\..\..\public\boost_1_47_0 , and include the boost lib in the linker tabs like this: ..\..\..\public\boost_1_47_0\stage\lib . I hope this is useful to you, good luck!


这篇关于包括其他头文件代码块中包含的头文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆