newbie: boost::filesystem problems
Hi, I want to use the filesystem library. For simplicity I first tried to compile the simple_ls.cpp (provided at: http://www.boost.org/libs/filesystem/doc/index.htm). Unfortunately I get lots of compiler-errors. For example the line 22:
fs::path full_path( fs::initial_pathfs::path() );
splitARFF.cpp:22: error: expected primary-expression before '>' token splitARFF.cpp:22: error: expected primary-expression before ')' token Does anyone have an idea how to solve the problem? THANKS The Makefile I used: ------------- OBJ = splitARFF.o CC = g++ SRC = $(OBJ:%.o=%.cpp) HDR = $(OBJ:%.o=%.h) LDFLAGS = -Wall -pg CFLAGS = -g -pg all: boostARFF boostARFF: splitARFF.o $(CC) $(LDFLAGS) $(OBJ) $(LIBS) -L/usr/lib -lboost_filesystem %.o: %.cpp $(CC) -c $(CFLAGS) $(SRC) -I/usr/include -------------
Maybe you should add the path to boost include directory in CFLAGS. For example on my default installation, it would be: CFLAGS=-g -pg -I/usr/include/boost-1_33_1 F. Bron boost-users-bounces@lists.boost.org a écrit sur 31/07/2007 11:17:28 :
Hi, I want to use the filesystem library. For simplicity I first tried to compile the simple_ls.cpp (provided at: http://www.boost. org/libs/filesystem/doc/index.htm). Unfortunately I get lots of compiler-errors.
For example the line 22:
fs::path full_path( fs::initial_pathfs::path() );
splitARFF.cpp:22: error: expected primary-expression before '>' token splitARFF.cpp:22: error: expected primary-expression before ')' token
Does anyone have an idea how to solve the problem? THANKS
The Makefile I used: ------------- OBJ = splitARFF.o
CC = g++ SRC = $(OBJ:%.o=%.cpp) HDR = $(OBJ:%.o=%.h)
LDFLAGS = -Wall -pg CFLAGS = -g -pg
all: boostARFF boostARFF: splitARFF.o $(CC) $(LDFLAGS) $(OBJ) $(LIBS) -L/usr/lib -lboost_filesystem %.o: %.cpp $(CC) -c $(CFLAGS) $(SRC) -I/usr/include
Avis : Ce message et toute pièce jointe sont la propriété d'Alcan et sont destinés seulement aux personnes ou à l'entité à qui le message est adressé. Si vous avez reçu ce message par erreur, veuillez le détruire et en aviser l'expéditeur par courriel. Si vous n'êtes pas le destinataire du message, vous n'êtes pas autorisé à utiliser, à copier ou à divulguer le contenu du message ou ses pièces jointes en tout ou en partie. Notice: This message and any attachments are the property of Alcan and are intended solely for the named recipients or entity to whom this message is addressed. If you have received this message in error please inform the sender via e-mail and destroy the message. If you are not the intended recipient you are not allowed to use, copy or disclose the contents or attachments in whole or in part.
participants (2)
-
Eduard Diner
-
frederic.bron@alcan.com