Boost Users :
Subject: Re: [Boost-users] UTF: test/included/unit_test.hpp vs test/unit_test.hpp
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2017-05-08 02:25:48
On 4/05/2017 15:14, Manav Bhatia via Boost-users wrote:
> A few days ago I started using this code on Ubuntu and kept getting
> segmentation faults with random values being returned
> for boost::unit_test::framework::master_test_suite().argc
> I managed to get rid of this problem by changing the included header to
> #include <boost/test/included/unit_test.hpp>
> I have seen the description
> here: http://www.boost.org/doc/libs/1_48_0/libs/test/doc/html/utf/compilation/direct-include.html.
> However, I am not quite able to follow why this problem occurred on
> Ubuntu (with system boost library) when I was still linking against the
> precompiled library (version 1.58).
Generally those sorts of problems occur when you use a different version
of the headers than the prebuilt libraries. Check your include and lib
paths at build time to see whether it's finding a different version than
you're expecting (eg. finding a local Boost instead of system Boost, or
You can also run ldd on the executable to see which version of the Boost
shared libraries it's trying to load at runtime and whether this is the
one you expect or not.
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