Click here to Skip to main content
12,813,994 members (34,273 online)
Rate this:
Please Sign up or sign in to vote.
See more: C++ Boost

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
Updated 24-Feb-13 13:49pm

1 solution

Rate this: bad
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!
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)

    Print Answers RSS
Top Experts
Last 24hrsThis month

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