Click here to Skip to main content
11,479,096 members (55,268 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Boost
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"
//...
 

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 24-Feb-13 13:46pm
Edited 24-Feb-13 13:49pm
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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!
  Permalink  
Comments
themrpacu at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 215
1 F-ES Sitecore 195
2 OriginalGriff 165
3 Frankie-C 120
4 DamithSL 95
0 Sergey Alexandrovich Kryukov 7,890
1 OriginalGriff 7,366
2 Sascha Lefèvre 3,064
3 Maciej Los 2,491
4 Richard Deeming 2,335


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 25 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100