This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [DSO missing from command line] gcc-c++ error


Yes, I think I have the proper flag added.

CMAKE file looks like this:

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=maybe-uninitialized
-std=gnu++0x --coverage -fprofile-arcs -ftest-coverage -lpthread")

On Fri, Sep 20, 2019 at 1:58 PM Segher Boessenkool <
segher@kernel.crashing.org> wrote:

> On Fri, Sep 20, 2019 at 01:42:21PM +0300, Vassilena Treneva wrote:
> > I am using the same versions of gcc-c++ and glibc (gcc-c++ 4.8.5 & glibc
> > 2.17) on RHEL7 and CENTOS7, but I get a compile time error ONLY on
> CENTOS7:
> >
> > /usr/bin/ld: CMakeFiles/GTest.Test.dir/gtest/gtest-all.cc.o: *undefined
> > reference to symbol 'pthread_key_delete@@GLIBC_2.2.5'*
> > //usr/lib64/libpthread.so.0:
> > *error adding symbols: DSO missing from command line*
>
> It says you should have -lpthread on your link command line.  Do you?
>
> (Often this library is automatically linked to, but not always).
>
>
> Segher
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]