Open GoogleCodeExporter opened 8 years ago
this is due to the linker flag ld --as-needed being default in ubuntu.
the -lpthread must be placed after all objects needing its symbols or -pthread
should be used.
Original comment by jtaylor....@googlemail.com
on 2 May 2012 at 5:48
http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
It makes a difference where in the command you write this option; the linker
searches and processes libraries and object files in the order they are
specified
so we need to put -lpthread followed by objects or source file
I attached this patch
Original comment by Lynn.Xin...@gmail.com
on 27 Sep 2012 at 6:37
Attachments:
Quite a number of people are running into this issue. I did not have any
problems under OSX 10.8.2 (perhaps because gcc are soft links to lvm), but as
soon as I moved my code to Ubuntu 12.04 I ran into this issue.
Easy fix, but quite a hassle.
See http://stackoverflow.com/questions/10315016/error-during-making-gtest
Original comment by r...@burhum.com
on 9 Dec 2012 at 7:26
Some fix steps:
What steps will reproduce the problem?
1.Download the gtest-1.6.0
2.cd make/
3.make
4.PROFIT!...
Today i`m first try google test for C++ and have spend over hours to install
it. Its quite wobbly to find a very OLD bug. And fix it.
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -pthread $^ -o $@
-pthread should be used instead of -lpthread
Thanks for all users who have found this bug over two years ago!
Original comment by kiril.sa...@gmail.com
on 29 Jul 2013 at 11:50
Original issue reported on code.google.com by
Briandkid
on 21 Nov 2011 at 2:24Attachments: