PDA

View Full Version : JAmfile QTcreator Boost ?



nhs_0702
31st March 2010, 10:24
i read information on http://solarix.ru/for_developers/cpp/boost/filesystem/en/index.shtml



The object-library source files (convenience.cpp, exception.cpp, operations_posix_windows.cpp, and path_posix_windows.cpp) are supplied in directory libs/filesystem/src. These source files implement the library for POSIX or Windows compatible operating systems; no implementation is supplied for other operating systems. Note that many operating systems not normally thought of as POSIX or Windows systems, such as mainframe legacy operating systems or embedded operating systems, support POSIX compatible file systems which will work with the Boost.Filesystem Library.

The object-library can be built for static or dynamic (shared/dll) linking. This is controlled by the BOOST_ALL_DYN_LINK or BOOST_FILESYSTEM_DYN_LINK macros. See the Separate Compilation page for a description of the techniques used.

The object-library can be built with a Jamfile supplied in directory libs/filesystem/build.


i want build

source:use jamfile ,can you help config QTCreator .pro me ?



#include <boost/filesystem/operations.hpp>
#include <iostream>
namespace fs = boost::filesystem;
int main( int argc, char* argv[] )
{
if ( argc != 2 )
{
std::cout << "Usage: file_size path\n";
return 1;
}
std::cout << "sizeof(intmax_t) is " << sizeof(boost::intmax_t) << '\n';
fs::path p( argv[1], fs::native );

if ( !fs::exists( p ) )
{
std::cout << "not found: " << argv[1] << std::endl;
return 1;
}
if ( !fs::is_regular( p ) )
{
std::cout << "not a regular file: " << argv[1] << std::endl;
return 1;
}
std::cout << "size of " << argv[1] << " is " << fs::file_size( p )
<< std::endl;
return 0;
}

us