Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:

C++
#include "boost/spirit/spirit.hpp"


In the above file:

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

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


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'
Posted
Updated 24-Feb-13 12:49pm
v2

1 solution

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!
 
Share this answer
 
Comments
themrpacu 25-Feb-13 5:35am    
Thanks for giving the question your attention. But boost::spirit is a header-olny library. What you seem to propose would apply to other boost libraries that require separately-compiled binaries.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900