Boost C++ Libraries: Ticket #11182: Iostreams can't find symbol only on OSX https://svn.boost.org/trac10/ticket/11182 <p> <strong>System</strong>: Darwin Kernel Version 14.3.0 </p> <p> <strong>Compiler</strong>: GCC 4.9 </p> <p> <strong>Boost version</strong>: Tried with 1.55, 1.57, 1.58-beta, boost-trunk of today </p> <p> <strong>Minimal example</strong>: </p> <pre class="wiki">#include &lt;boost/iostreams/device/file_descriptor.hpp&gt; #include &lt;boost/iostreams/stream.hpp&gt; int main () { boost::iostreams::stream&lt;boost::iostreams::file_descriptor&gt; fdstream; return 0; } </pre><p> <strong>Outcome</strong>: </p> <pre class="wiki">$ /usr/local/bin/g++-4.9 -I /opt/boost/include/ -L /opt/boost/lib/ -lboost_iostreams -o foo foo.cpp Undefined symbols for architecture x86_64: "boost::iostreams::file_descriptor::seek(long, std::_Ios_Seekdir)", referenced from: std::fpos&lt;__mbstate_t&gt; boost::iostreams::detail::seek_device_impl&lt;boost::iostreams::any_tag&gt;::seek&lt;boost::iostreams::file_descriptor&gt;(boost::iostreams::file_descriptor&amp;, long, std::_Ios_Seekdir, std::_Ios_Openmode) in ccr82hhn.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11182 Trac 1.4.3 anonymous Mon, 18 Jan 2016 04:02:18 GMT <link>https://svn.boost.org/trac10/ticket/11182#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11182#comment:1</guid> <description> <p> boost stable 1.59.0 – the problem still persists </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andreas F. Borchert</dc:creator> <pubDate>Thu, 19 May 2016 16:07:13 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11182#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11182#comment:2</guid> <description> <p> This is a typical problem of a library being compiled with clang++ but then linked to objects generated by g++. This fails in case of the boost libraries. If you want to use them with g++, you have to compile them using g++. (Note that "brew install boost" delivers you a boost library compiled by clang++.) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel</dc:creator> <pubDate>Mon, 12 Feb 2018 03:49:08 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11182#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11182#comment:3</guid> <description> <p> I encountered this error on macOS, after installing Boost 1.66.0 using <strong>brew install boost</strong>. Since this by default links to clang compiler, switch to gcc and reinstall using <strong>brew install boost --cc=g++-7</strong>, substituting for your gcc. This took quite a while, so let brew do it's thing. </p> </description> <category>Ticket</category> </item> </channel> </rss>