Click here to Skip to main content
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 625
1 OriginalGriff 285
2 George Jonsson 225
3 CPallini 210
4 Fredrik Bornander 150
0 OriginalGriff 5,835
1 Sergey Alexandrovich Kryukov 5,263
2 CPallini 4,750
3 George Jonsson 3,227
4 Gihan Liyanage 2,487


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 25 Feb 2013
Copyright © CodeProject, 1999-2014
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