#-------------------------------------------------
#
# Project created by QtCreator 2010-03-30T04:29:20
#
#-------------------------------------------------
QT -= gui
TARGET = QTBoost_Simple
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += D:/CD_LAP_TRINH/cach_su_dung_thu_vien_boost/Boost_Mingw
LIBS += "D:/CD_LAP_TRINH/cach_su_dung_thu_vien_boost/Boost_Mingw/lib/libboost_filesystem-mgw34-mt.lib"
LIBS += "D:/CD_LAP_TRINH/cach_su_dung_thu_vien_boost/Boost_Mingw/lib/libboost_system-mgw34-mt.lib"
LIBS += "D:/CD_LAP_TRINH/cach_su_dung_thu_vien_boost/Boost_Mingw/lib/libboost_thread-mgw34-mt.lib"
LIBS += "C:/MinGW/lib/gcc/mingw32/3.4.5/libgcc.a"
LIBS += -lws2_32
LIBS += -lwinmm
LIBS += -lgcc
#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;
}
#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;
}
To copy to clipboard, switch view to plain text mode
Boost_Mingw/lib/libboost_filesystem-mgw34-mt.lib(operations.o)
perations.cpp
.text+0x5f2): undefined reference to `__gxx_personality_sj0'
Boost_Mingw/lib/libboost_filesystem-mgw34-mt.lib(operations.o)
perations.cpp
.text+0xa58): undefined reference to `__gxx_personality_sj0'
Bookmarks