Boost logo

Boost Users :

Subject: Re: [Boost-users] Some strange boost headers errors
From: Nate Crookston (nathan.crookston_at_[hidden])
Date: 2014-11-18 17:09:03


alfonso santimone wrote:

> Hi Nate,
> if i compile this
>
> // boosttest.cpp : Defines the entry point for the console application.
> //
>
> #include <boost/shared_ptr.hpp>
> #include "stdafx.h"
>
>
> int main()
> {
> return 0;
> }
>
>
> i have this
>
> 1>------ Rebuild All started: Project: boosttest, Configuration: Debug
> Win32 ------
> 1> stdafx.cpp
> 1> boosttest.cpp
> 1> boosttest.vcxproj -> C:\Users\Live
> Machine\Desktop\boosttest\boosttest\Debug\boosttest.exe
> ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
>
>
> so actually works
>
> what do you mean exactly with
> "Usually with issues like that, I blame a missing curly-brace '}' in a
> source file included previously." ?
>

 I would bet that in your actual source, one of the header files has
something like the following:

namespace my_stuff
{
//Lots of stuff, but no terminating '}'.

That always throws of the compiler and gives you nearly unreadable errors
in other header or source files. I would check the headers you're
including to verify that something like that isn't happening with a
namespace, function or class.

By verifying that you can #include shared_ptr, it think it's clear that
your include path is set correctly.

HTH,
Nate

P.S. Please don't top-post



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net