Am Donnerstag, 4. Februar 2016, 10:53:37 schrieb rpela...@archlinux.info:
> 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.
>
> Try and add this to your cmake file:
> find_package (Threads)
First:
>
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.
Try and add this to your cmake file:
find_package (Threads)
target_link_libraries (myexecutable/lib ${CMAKE_THREAD_LIBS_INIT})
Sent from my iPhone
> On Feb 4,
Hello,
I have a cmake project that uses C++11 threads.
I have added the lines
set (CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
CMAKE version is 3.2.2, running on Ubuntu.
When I try to build, I get the error
undefined reference to `pthread_create`
Any ideas on how to fix this?
Probably didn't previously need pthreads until you updated to use
C++11 features which brings in pthreads in the deadstart code...
On Thu, Feb 4, 2016 at 8:53 AM, rpela...@archlinux.info
wrote:
> I believe that doesn't have anything to do with C11 flags. You are just
>
Thanks. So, even though threading is part of the standard, I still need to
link to pthreads library ?
On Thu, Feb 4, 2016 at 11:53 AM, rpela...@archlinux.info <
rpela...@archlinux.info> wrote:
> I believe that doesn't have anything to do with C11 flags. You are just
> missing the link to the
On Thu, Feb 4, 2016 at 9:55 AM, Aaron Boxer wrote:
> Thanks. So, even though threading is part of the standard, I still need to
> link to pthreads library ?
Yes; sounds more like an issue for GCC :) I mean you don't have to
tell it to link against c library or c++ runtime
Thanks, guys This is working now.
Cheers,
Aaron
On Thu, Feb 4, 2016 at 1:05 PM, J Decker wrote:
> On Thu, Feb 4, 2016 at 9:55 AM, Aaron Boxer wrote:
> > Thanks. So, even though threading is part of the standard, I still need
> to
> > link to pthreads