title: undefined reference to `boost::this_thread:
body: <p>I am trying to build to Doge coin headless wallet (similar to bitcoind) it seems to be Boost causing the error but I have no idea on how to fix it.</p>
  
  <p>(Ubuntu 12.04)</p>
  
  <p>When I execute "make -f makefile.unix USE_UPNP=-" I get this error:</p>
  
  <pre><code>/bin/sh ../share/genbuild.sh obj/build.h
  g++ -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DUSE_IPV6 -DBOOST_SPIRIT_THREADSAFE -I/root/dogecoin/src -I/root/dogecoin/src/obj -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -o dogecoind obj/version.o obj/checkpoints.o obj/netbase.o obj/addrman.o obj/crypter.o obj/key.o obj/db.o obj/init.o obj/irc.o obj/keystore.o obj/main.o obj/net.o obj/protocol.o obj/bitcoinrpc.o obj/rpcdump.o obj/rpcnet.o obj/rpcrawtransaction.o obj/script.o obj/scrypt.o obj/sync.o obj/util.o obj/wallet.o obj/walletdb.o obj/noui.o -Wl,-z,relro -Wl,-z,now   -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -l db_cxx -l ssl -l crypto -Wl,-Bdynamic -l z -l dl -l pthread
  obj/db.o: In function `CAddrDB::Write(CAddrMan const&amp;)':
  /root/dogecoin/src/db.cpp:764: undefined reference to `RenameOver(boost::filesystem3::path, boost::filesystem3::path)'
  obj/init.o: In function `AppInit2()':
  /root/dogecoin/src/init.cpp:450: undefined reference to `CreatePidFile(boost::filesystem3::path const&amp;, int)'
  obj/main.o: In function `operator/':
  /usr/local/include/boost/filesystem/path.hpp:648: undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&amp;)'
  obj/main.o: In function `sleep':
  /usr/local/include/boost/thread/pthread/thread_data.hpp:249: undefined reference to `boost::this_thread::hiden::sleep_until(timespec const&amp;)'
  obj/main.o: In function `space':
  /usr/local/include/boost/filesystem/operations.hpp:520: undefined reference to `boost::filesystem::detail::space(boost::filesystem::path const&amp;, boost::system::error_code*)'
  obj/main.o: In function `sleep':
  /usr/local/include/boost/thread/pthread/thread_data.hpp:249: undefined reference to `boost::this_thread::hiden::sleep_until(timespec const&amp;)'
  obj/main.o: In function `boost::thread::start_thread()':
  /usr/local/include/boost/thread/detail/thread.hpp:180: undefined reference to `boost::thread::start_thread_noexcept()'
  obj/bitcoinrpc.o: In function `sleep':
  /usr/local/include/boost/thread/pthread/thread_data.hpp:249: undefined reference to `boost::this_thread::hiden::sleep_until(timespec const&amp;)'
  obj/bitcoinrpc.o: In function `boost::filesystem::path::has_root_directory() const':
  /usr/local/include/boost/filesystem/path.hpp:444: undefined reference to `boost::filesystem::path::root_directory() const'
  obj/bitcoinrpc.o: In function `operator/':
  /usr/local/include/boost/filesystem/path.hpp:648: undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&amp;)'
  obj/bitcoinrpc.o: In function `exists':
  /usr/local/include/boost/filesystem/operations.hpp:289: undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&amp;, boost::system::error_code*)'
  obj/bitcoinrpc.o: In function `boost::filesystem::path::has_root_directory() const':
  /usr/local/include/boost/filesystem/path.hpp:444: undefined reference to `boost::filesystem::path::root_directory() const'
  obj/bitcoinrpc.o: In function `operator/':
  /usr/local/include/boost/filesystem/path.hpp:648: undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&amp;)'
  obj/bitcoinrpc.o: In function `exists':
  /usr/local/include/boost/filesystem/operations.hpp:289: undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&amp;, boost::system::error_code*)'
  obj/bitcoinrpc.o: In function `call_once&lt;void (*)()&gt;':
  /usr/local/include/boost/thread/pthread/once_atomic.hpp:145: undefined reference to `boost::thread_detail::enter_once_region(boost::once_flag&amp;)'
  /usr/local/include/boost/thread/pthread/once_atomic.hpp:157: undefined reference to `boost::thread_detail::commit_once_region(boost::once_flag&amp;)'
  /usr/local/include/boost/thread/pthread/once_atomic.hpp:153: undefined reference to `boost::thread_detail::rollback_once_region(boost::once_flag&amp;)'
  /usr/local/include/boost/thread/pthread/once_atomic.hpp:145: undefined reference to `boost::thread_detail::enter_once_region(boost::once_flag&amp;)'
  /usr/local/include/boost/thread/pthread/once_atomic.hpp:157: undefined reference to `boost::thread_detail::commit_once_region(boost::once_flag&amp;)'
  /usr/local/include/boost/thread/pthread/once_atomic.hpp:153: undefined reference to `boost::thread_detail::rollback_once_region(boost::once_flag&amp;)'
  obj/util.o: In function `operator/':
  /usr/local/include/boost/filesystem/path.hpp:648: undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&amp;)'
  obj/util.o: In function `path&lt;char*&gt;':
  /usr/local/include/boost/filesystem/path.hpp:139: undefined reference to `boost::filesystem::path::codecvt()'
  obj/util.o: In function `system_complete':
  /usr/local/include/boost/filesystem/operations.hpp:531: undefined reference to `boost::filesystem::detail::system_complete(boost::filesystem::path const&amp;, boost::system::error_code*)'
  obj/util.o: In function `is_directory':
  /usr/local/include/boost/filesystem/operations.hpp:294: undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&amp;, boost::system::error_code*)'
  obj/util.o: In function `create_directory':
  /usr/local/include/boost/filesystem/operations.hpp:405: undefined reference to `boost::filesystem::detail::create_directory(boost::filesystem::path const&amp;, boost::system::error_code*)'
  obj/util.o: In function `GetDataDir(bool)':
  /root/dogecoin/src/util.cpp:1029: undefined reference to `boost::filesystem::path::operator/=(char const*)'
  obj/util.o: In function `operator/':
  /usr/local/include/boost/filesystem/path.hpp:648: undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&amp;)'
  obj/util.o: In function `boost::filesystem::path::has_root_directory() const':
  /usr/local/include/boost/filesystem/path.hpp:444: undefined reference to `boost::filesystem::path::root_directory() const'
  obj/util.o: In function `operator/':
  /usr/local/include/boost/filesystem/path.hpp:648: undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&amp;)'
  obj/util.o: In function `boost::filesystem::path::has_root_directory() const':
  /usr/local/include/boost/filesystem/path.hpp:444: undefined reference to `boost::filesystem::path::root_directory() const'
  obj/util.o: In function `operator/':
  /usr/local/include/boost/filesystem/path.hpp:648: undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&amp;)'
  /usr/local/include/boost/filesystem/path.hpp:648: undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&amp;)'
  /usr/local/include/boost/filesystem/path.hpp:648: undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&amp;)'
  obj/walletdb.o: In function `sleep':
  /usr/local/include/boost/thread/pthread/thread_data.hpp:249: undefined reference to `boost::this_thread::hiden::sleep_until(timespec const&amp;)'
  obj/walletdb.o: In function `operator/':
  /usr/local/include/boost/filesystem/path.hpp:648: undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&amp;)'
  obj/walletdb.o: In function `is_directory':
  /usr/local/include/boost/filesystem/operations.hpp:294: undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&amp;, boost::system::error_code*)'
  obj/walletdb.o: In function `copy_file':
  /usr/local/include/boost/filesystem/operations.hpp:381: undefined reference to `boost::filesystem::detail::copy_file(boost::filesystem::path const&amp;, boost::filesystem::path const&amp;, boost::filesystem::copy_option::enum_type, boost::system::error_code*)'
  obj/walletdb.o: In function `sleep':
  /usr/local/include/boost/thread/pthread/thread_data.hpp:249: undefined reference to `boost::this_thread::hiden::sleep_until(timespec const&amp;)'
  obj/walletdb.o: In function `operator/=&lt;std::basic_string&lt;char&gt; &gt;':
  /usr/local/include/boost/filesystem/path.hpp:302: undefined reference to `boost::filesystem::path::codecvt()'
  obj/walletdb.o: In function `boost::filesystem::path&amp; boost::filesystem::path::append&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, std::codecvt&lt;wchar_t, char, __mbstate_t&gt; const&amp;)':
  /usr/local/include/boost/filesystem/path.hpp:707: undefined reference to `boost::filesystem::path::m_append_separator_if_needed()'
  /usr/local/include/boost/filesystem/path.hpp:710: undefined reference to `boost::filesystem::path::m_erase_redundant_separator(unsigned long)'
  collect2: ld returned 1 exit status
  make: *** [dogecoind] Error 1
  </code></pre>