|
Boost Users : |
From: Richard Kaiser (junk1_at_[hidden])
Date: 2005-09-26 17:52:36
Aaron, thanks for your information. Until yesterday, I have seen this
the same way as you said. But then I succeeded to compile the unittest
examples (those that are installed with boost)
g++ -Ic:\boost\boost_1_33_0 unit_test_example1.cpp
without any link library.
I had modify this example a little, since without "#define geaendert_RK"
it did not compile - neither with nor without libs.
// (C) Copyright Gennadiy Rozental 2002-2005.
// (C) Copyright Gennadiy Rozental & Ullrich Koethe 2001.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
// Boost.Test
#include <boost/test/unit_test.hpp>
#define geaendert_RK // required to compile with g++, BCB6 - RK
#ifndef geaendert_RK
using boost::unit_test::test_suite;//Unresolved external '_main' - RK
#else
#include <boost/test/included/unit_test_framework.hpp>
using namespace boost::unit_test_framework;
#endif
// most frequently you implement test cases as a free functions
void free_test_function()
{
// reports 'error in "free_test_function": test 2 == 1 failed'
BOOST_CHECK(2 == 1); // non-critical test => continue after failure
int* p = (int*)0;
*p = 0;
}
test_suite*
init_unit_test_suite( int, char* [] ) {
test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" );
// this example will pass cause we know ahead of time number of
expected failures
test->add( BOOST_TEST_CASE( &free_test_function ), 1 /* expected
one error */ );
return test;
}
// EOF
Why does this compile without any libs?
Richard
Aaron Griffin schrieb:
> On 9/26/05, Richard Kaiser <junk1_at_[hidden]> wrote:
>
>>Can anybody tell me, which of the Boost libraries need libs (usually
>>created with bjam)?
>>
>>As far as I can see, for most of the Boost libraries source code
>>#includes are sufficient. For them, installation step 1 from the
>>"Getting Started"-page is sufficient. Or do I get something wrong?
>
>
> If you build the whole shebang from scratch you can see which
> libraries need libs and which don't.
>
> In addition, you can look at this file list here:
> http://archlinux.org/packages.php?op=files&id=5997
>
> The /usr/lib entries will have all the libs with a standard boost
> build.... I did the hard work for you... the following libraries
> require .so/.a libraries:
> boost_date_time
> boost_filesystem
> boost_iostreams
> boost_prg_exec_monitor
> boost_program_options
> boost_python
> boost_regex
> boost_serialization
> boost_signals
> boost_test_exec_monitor
> boost_thread
> boost_unit_test_framework
> boost_wave
> boost_wserialization
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