Boost logo

Boost Users :

Subject: [Boost-users] Simple Filesystem Library Build and Usage
From: df.trash (df.trash_at_[hidden])
Date: 2008-10-22 14:37:09


Using: Boost 1.36
Want to build static Filesystem Library for Windows and Linux. Right now I
want to make sure the build is successful with the compilers we are using.
I am a noobie with Boost and BJam, and am having difficulties building a
test application for testing. Unfortunately, I'm dusting off my programming
hat and learning to use all the appropriate tools again like compilers etc.
I have read through much of the Boost instructions but still cannot seem to
get the Filesystem library compiled as a static library and working with
practical examples.

Question: What is the simplest way to build a library to be used by my other
source code out of the Filesystem Library on both Windows and Unix systems?
And what is the simplest way to test that build?

My first test is on Windows XP with Visual Studio Express 2005.

*Attempt 1: *Create App with Visual Studio 2005
I ran the following from main Boost directory on the command line to create
the library files:
bjam debug --with-filesystem stage

I then started a new Win32 Console Application in Visual Studio with the
file_size.cpp test example.
Under "Additional Include Directories" I put: "C:\Program
Files\boost_1_36_0";"C:\Program Files\boost_1_36_0\stage\lib"
I then tried to build the solution, and received the following error:

LINK : fatal error LNK1104: cannot open file 'uuid.lib'

*Attempt 2:* Create App with BJam
I navigated to \libs\filesystem\src and created a Jamfile with the
following:
lib test : operations.cpp path.cpp portability.cpp utf8_codecvt_facet.cpp :
<variant>debug <link>static ;
I ran bjam in this folder which created a library:
libtest-vc80-mt-gd-1_36.lib

I copied the file to \libs\filesystem\example and created a Jamfile there
with the following:
exe FilesystemTest : file_size.cpp libtest-vc80-mt-gd-1_36.lib ;
After running bjam in this folder, I received severael unresolved symbol
erros like the following:

file_size.obj : error LNK2019: unresolved external symbol "class
boost::system::error_category const & __cdecl
boost::system::get_system_category(void)" (?get_system_category_at_system
@boost@@YAABVerror_category_at_12@XZ) referenced in function "public:
__thiscall boost::system::error_code::error_code(void)"
(??0error_code_at_system@boost@@QAE_at_XZ)

Any help would be much appreciated!



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net