Click here to Skip to main content
11,709,581 members (52,970 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 12:46pm
Edited 24-Feb-13 12: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 514
1 OriginalGriff 250
2 Peter Leow 229
3 Maciej Los 185
4 Mika Wendelius 175
0 OriginalGriff 9,428
1 Sergey Alexandrovich Kryukov 9,037
2 CPallini 5,189
3 Maciej Los 4,991
4 Mika Wendelius 3,856


Advertise | Privacy | Mobile
Web02 | 2.8.150819.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