<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>I believe that doesn't have anything to do with C11 flags. You are just missing the link to the pthread library. I could be wrong.</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Try and add this to your cmake file:</div><div id="AppleMailSignature"><pre style="margin-top: 0px; margin-bottom: 0.8em; padding: 10px; border: 0px; line-height: inherit; vertical-align: baseline; word-wrap: break-word; word-break: break-all; max-height: 300px; overflow: auto;"><code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; max-height: 300px; overflow: auto; white-space: normal; background-color: rgba(255, 255, 255, 0);"><font face="UICTFontTextStyleBody">find_package (Threads) </font></code></pre><pre style="margin-top: 0px; margin-bottom: 0.8em; padding: 10px; border: 0px; line-height: inherit; vertical-align: baseline; word-wrap: break-word; word-break: break-all; max-height: 300px; overflow: auto;"><code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant-caps: inherit; line-height: inherit; vertical-align: baseline; max-height: 300px; overflow: auto; white-space: normal; background-color: rgba(255, 255, 255, 0);"><font face="UICTFontTextStyleBody">target_link_libraries (myexecutable/lib ${CMAKE_THREAD_LIBS_INIT})</font></code></pre></div><div id="AppleMailSignature"><br><br>Sent from my iPhone</div><div><br>On Feb 4, 2016, at 10:42 AM, Aaron Boxer <<a href="mailto:boxerab@gmail.com">boxerab@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div><div><div><div><div>Hello,<br></div>I have a cmake project that uses C++11 threads.<br></div>I have added the lines <br><br></div>set (CMAKE_CXX_STANDARD 14)<br></div>set(CMAKE_CXX_STANDARD_REQUIRED ON)<br><br><br></div><div>CMAKE version is 3.2.2, running on Ubuntu.<br><br></div><div>When I try to build, I get the error<br><br></div><div>undefined reference to `pthread_create`<br><br></div><div>Any ideas on how to fix this?<br><br></div><div>Thanks!<br></div><div>Aaron<br></div></div>
</div></blockquote><blockquote type="cite"><div><span>-- </span><br><span></span><br><span>Powered by <a href="http://www.kitware.com">www.kitware.com</a></span><br><span></span><br><span>Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a></span><br><span></span><br><span>Kitware offers various services to support the CMake community. For more information on each offering, please visit:</span><br><span></span><br><span>CMake Support: <a href="http://cmake.org/cmake/help/support.html">http://cmake.org/cmake/help/support.html</a></span><br><span>CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html">http://cmake.org/cmake/help/consulting.html</a></span><br><span>CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html">http://cmake.org/cmake/help/training.html</a></span><br><span></span><br><span>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></span><br><span></span><br><span>Follow this link to subscribe/unsubscribe:</span><br><span><a href="http://public.kitware.com/mailman/listinfo/cmake">http://public.kitware.com/mailman/listinfo/cmake</a></span></div></blockquote></body></html>