Hi Team,

Greetings for the day.

I apologies if this is a duplicate case which is already reported, but I am unable to find a suitable answer for this.

I have installed boost(1.67.0.1) via brew, and created a simple unit test case as below.

#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE super
#include <boost/test/unit_test.hpp>

using namespace boost::unit_test;

std::string uri;
std::string versionNum;

BOOST_AUTO_TEST_CASE( free_test_function ) {
    BOOST_CHECK(true /* test assertion */);
}

Compiled this code as below.

g++ obj/main.o -L  /Library/PostgreSQL/9.6/lib -L /usr/local/lib -L /usr/local/opt/openssl/lib/  -o test_integration -lpq -lcpprest -lboost_regex-mt -lboost_system-mt -lboost_thread-mt -lssl -lcrypto -lboost_chrono-mt -lboost_log-mt -lboost_locale-mt -lboost_date_time-mt -lboost_program_options-mt -lboost_stacktrace_noop-mt -lboost_filesystem-mt -lboost_unit_test_framework-mt
test integration installation is completed.



Got the error, while I execute the binary.

./test_integration                                                              
libc++abi.dylib: terminating with uncaught exception of type boost::unit_test::framework::setup_error: test unit with name 'free_test_function' registered multiple times
[1]    59619 abort      ./test_integration

I have tried to debug the binary, which execution is successful.

lldb -- ./pgBucket_integration                                                
(lldb) target create "./pgBucket_integration"
Current executable set to './pgBucket_integration' (x86_64).
(lldb) r
Process 60066 launched: './pgBucket_integration' (x86_64)
Running 1 test case...

*** No errors detected
Process 60066 exited with status = 0 (0x00000000)

I would like to request you to guide me on what/where I am missing.

Below are my g++ version details.
$ g++ --version                                                                 
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

--