Boost logo

Boost Users :

From: John McMahon (john_gg_mcmahon_at_[hidden])
Date: 2007-05-01 06:53:13


Hi Grennadiy, thanks for your help so far.
I might just switch to the no libraries solution and wait for 1.34 binaries to be built, since I don't have time on my schedule to dig deeper into the boost build.

Correct me if I'm wrong - if I chose to use the synchronous exceptions version of the libraries now on Boost Consulting website, the core libraries ought to work fine, it is just that I ought to expect runtime exceptions to terminate the execution of any code I write using it. Ie please confirm that there's no reason to think that boost-test, etc might not function with this exception model.

Just on the no-libraries solution. I can't find anything documented about any special compiler settings to get it to work with vc80.
When I set /EHsc, the popped up exception occurs. When I set /EHa, the program _appears_ to finish fine, but on closer inspection of the console output, I discover the access violation message is there in the console. But I guess this is not what I should get with my no-libraries test. What am I doing wrong here?

--
OUTPUT:
$ ./Boost_test_1_withoutSeparateLibrary.exe
Running 1 test case...
d:/john/syncfolder/projects/programming/c++/vc++/projects/boost_test_1/boost_test_1/getstarted.cpp(13): error in "free_te
st_function": check 3 == 1 failed
unknown location(0): fatal error in "free_test_function": memory access violation
*** 1 failure detected (1 failure expected) in test suite "Unit test example 1"
---
#include <boost/test/included/unit_test_framework.hpp> 
using boost::unit_test::test_suite;
void free_test_function(){
BOOST_CHECK(3 == 1); 
int* p = (int*)0;
*p = 0;}
test_suite* init_unit_test_suite( int, char* [] ) {
test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" );
test->add( BOOST_TEST_CASE( &free_test_function ), 1 /* expected one error */ );
return test;}



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