<div dir="ltr"><div>Hi Team,<br><br></div><div>Greetings for the day.<br><br></div><div>I apologies if this is a duplicate case which is already reported, but I am unable to find a suitable answer for this.<br></div><div><div><br></div><div>I have installed boost(1.67.0.1) via brew, and created a simple unit test case as below.<br><br><span style="font-family:monospace,monospace">#define BOOST_TEST_DYN_LINK<br>#define BOOST_TEST_MODULE super<br>#include &lt;boost/test/unit_test.hpp&gt;<br><br>using namespace boost::unit_test;<br><br>std::string uri;<br>std::string versionNum;<br><br>BOOST_AUTO_TEST_CASE( free_test_function ) {<br>    BOOST_CHECK(true /* test assertion */);<br>}<br></span><br></div><div><u>Compiled this code as below.</u><br><br><span style="font-family:monospace,monospace">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<br>test integration installation is completed.</span><br></div><div><br><br></div><div><u>Got the error, while I execute the binary.</u><br><br><span style="font-family:monospace,monospace">./test_integration                                                               <br>libc++abi.dylib: terminating with uncaught exception of type <span style="color:rgb(255,0,0)">boost::unit_test::framework::setup_error: test unit with name &#39;free_test_function&#39; registered multiple times</span><br>[1]    59619 abort      ./test_integration<br><u><br></u></span></div><div><u>I have tried to debug the binary, which execution is successful.</u><br><br><span style="font-family:monospace,monospace">lldb -- ./pgBucket_integration                                                 <br>(lldb) target create &quot;./pgBucket_integration&quot;<br>Current executable set to &#39;./pgBucket_integration&#39; (x86_64).<br>(lldb) r<br>Process 60066 launched: &#39;./pgBucket_integration&#39; (x86_64)<br>Running 1 test case...<br><br>*** No errors detected<br>Process 60066 exited with status = 0 (0x00000000)<br><br></span></div><div><span style="font-family:arial,helvetica,sans-serif">I would like to request you to guide me on what/where I am missing.<br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><u>Below are my g++ version details.</u><br></font>$ g++ --version                                                                  <br>Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1<br>Apple LLVM version 8.1.0 (clang-802.0.42)<br>Target: x86_64-apple-darwin16.4.0<br>Thread model: posix<br>InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin<font face="arial,helvetica,sans-serif"><br><br></font></span></div><div>-- <br><div class="gmail_signature"><div dir="ltr"><br><div><font face="verdana, sans-serif">Regards,</font></div><div><font face="verdana, sans-serif">Dinesh</font></div><div><font face="verdana, sans-serif"><a href="http://manojadinesh.blogspot.com" target="_blank">manojadinesh.blogspot.com</a></font></div></div></div>
</div></div></div>