Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#625 deleted Support Requests (None)

Cannot access boost::filesystem namespace

Reported by: nobody Owned by: nobody
Milestone: Component: filesystem
Version: None Severity: Cosmetic
Keywords: Cc:

Description

Hi.

I am quite new to programming, however, I decided to
install the boost library as it looks very good.

The first two lines of my program are:
#include "boost/filesystem/operations.hpp"
#include "boost/filesystem/fstream.hpp" 

Yet when I include the statement:
using boost::filesystem;
just after, I get an error message saying:
"error C2873: 'boost::filesystem' : symbol cannot be
used in a using-declaration"

I am using Microsoft Visual Studio 2005. Where could I
have gone wrong? I have tried to find documentation
that will help, but I haven't found anything. I have
followed the installation to the letter.


Change History (6)

comment:1 Changed 13 years ago by nobody

Logged In: NO 

Hi.

I think I have figured out the problem. I was missing the
keyword 'namespace', (which doesn't appear to be in the
example). Everything seems to be ok now, so please feel free
to delete this post.

comment:2 Changed 13 years ago by vawjr

Logged In: YES 
user_id=5962

using namespace boost::filesystem;


comment:3 Changed 13 years ago by nobody

Logged In: NO 

boost::filesystem is only a namespace, so you should
probably write 'using namespace boost::filesystem;'

comment:4 Changed 12 years ago by Gennaro Prota

Status: assignedclosed

comment:5 Changed 11 years ago by Daryle Walker

Component: Nonefilesystem
Severity: Showstopper

comment:6 Changed 11 years ago by Daryle Walker

Severity: ShowstopperCosmetic
Note: See TracTickets for help on using tickets.