Closed GoogleCodeExporter closed 9 years ago
In general, it is not advisable to put one's tests into an archive. When the
error message you see is fixed you'll
only see this output:
Running main() from gtest_main.cc
[==========] Running 0 tests from 0 test cases.
[==========] 0 tests from 0 test cases ran. (0 ms total)
[ PASSED ] 0 tests.
See this thread for more info:
http://groups.google.com/group/googletestframework/browse_thread/thread/db90eb23
9482d69d
With regards to the error message, what is the version of Ubuntu you use? What
is your compiler version? Have
you modified Makefile or the source code in any other way?
Original comment by vladlosev
on 6 May 2010 at 2:52
Original comment by vladlosev
on 6 May 2010 at 2:53
Is that mean test samples can only be linked as an object file(not an archive)?
Otherwise the sample won't be linked. Is there any reason? I don't have a deep
understanding of the difference between .o and .a .
Ubuntu version 9.10
gcc version 4.4.1
I only modified Makefile mentioned previously
Original comment by zheng_xi...@rst.ricoh.com
on 7 May 2010 at 1:30
Yes, unless you modify your code and/or linker options in a specific way. The
details are in the discussion linked.
Original comment by vladlosev
on 7 May 2010 at 1:36
It seams that I can't open this link.
http://groups.google.com/group/googletestframework/browse_thread/thread/db90eb23
9482d69d
Can you send the content of link to me? thanks a lot.
Original comment by zheng_xi...@rst.ricoh.com
on 7 May 2010 at 1:46
In short, the GCC linker will not link in a static library unless there are
references to symbols inside it, unlike an
object file.
Original comment by vladlosev
on 7 May 2010 at 2:45
Closing per Vlad's comment from May.
Original comment by w...@google.com
on 27 Sep 2010 at 7:21
Original issue reported on code.google.com by
zheng_xi...@rst.ricoh.com
on 6 May 2010 at 7:44