I want to use boost filesystem functions and I searched my build log and find these lines:
1> Searching C:\local\boost_1_55_0\stage\lib\libboost_filesystem-vc90-mt-1_55.lib: 1> Searching C:\local\boost_1_55_0\stage\lib\libboost_system-vc90-mt-1_55.lib: 1> Searching C:\local\boost_1_55_0\stage\lib\boost_system-vc90-1_55.lib:
so it did find the libs.
what I med are:
proc1.obj : error LNK2001: unresolved external symbol "unsigned __int64 __cdecl boost::filesystem::detail::file_size(class boost::filesystem::path const &,class boost::system::error_code *)" (?file_size@detail@filesystem@boost@@YA_KAEBVpath@23@PEAVerror_code@system@3@@Z)
how to solve this?
my test code:
#include <stdlib.h>
#include <string>
#include <iostream>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
using namespace std;
namespace fs = boost::filesystem;
int main()
{
string filepath( "H:\\DataSets\\xxx" );
int a = fs::file_size(filepath.c_str());
}