FileSystem Lieven de Cock lieven.de.cock@telenet.be www.codeblocks.org
libraries We will look at functionality of the following libraries : boost poco
environment All is build/tested using gcc 4.7.3 (and newer) with active c++11 support (-std=c++11) All projects : codeblocks (works on both linux / windows / mac) All that is needed : - build poco - build boost - adjust cbp files (include/links paths) or simulate directory structure [see later])
Build boost (on linux) Latest version at this time : 1.58 Download “boost_1_58_0.tar.gz” Extract it somewhere in a temporary directory In that directory issue the following commands : ./bootstrap.sh --prefix=/home/killerbot/boost ./b2 -j12 cxxflags=-std=c++11 install → headers/libraries installed in boost subdir of my home directory → adjust -j12 to your multicores ;-)
Build poco (on linux) Latest (official) version at this time : 1.6.0 Download “poco-1.6.0.tar.gz” (basic edition) Extract it somewhere in a temporary directory Adjust line in the file 'build/config/Linux' : CXXFLAGS = -Wall -Wno-sign-compare -std=c++11 In that temporary directory issue the following commands : ./configure --prefix=/home/killerbot/poco --no-samples --no-tests --static make -s DEFAULT_TARGET=static_release -j12 make -s DEFAULT_TARGET=static_release install → headers/libraries installed in poco subdir of my home directory → adjust -j12 to your multicores ;-)
Environment (part 2) The location towards poco and boost have been specified in the Code::Blocks project files by means of a global variable in Code::Blocks As such include paths and linker paths are specified like this : ${#BOOST_BASE}/include ${#BOOST_BASE}/lib ${#POCO_BASE}/include ${#POCO_BASE}/lib
Boost FileSystem Filesystem library of boost, depending on boost system library Header file to use : <boost/filesystem.hpp> Error/failures : choose between : - exceptions - error codes http://www.boost.org/doc/libs/1_58_0/libs/filesystem/doc/index.htm
Poco FileSystem Poco foundation library Typical headers : - <Poco/Path.h> - <Poco/File.h> - <Poco/DirectoryIterator> - <Poco/Glob.h> http://pocoproject.org/slides/080-Files.pdf http://pocoproject.org/docs/Poco.File.html
C++17 ??? Will have a new library FileSystem Derived from Boost::FileSystem Play with it in Visual Studio 2015 Working document for standard : http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3940.html
contact forums.codeblocks.org (killerbot) lieven.de.cock@telenet.be