1

After following these steps to set up an iphone project with CoverStory, my build fails with two linker errors.

Undefined symbols:
  "_vproc_transaction_end", referenced from:
      _gcov_exit in libgcov.a(_gcov.o)
      _vproc_transaction_end$non_lazy_ptr in libgcov.a(_gcov.o)
     (maybe you meant: _vproc_transaction_end$non_lazy_ptr)
  "_vproc_transaction_begin", referenced from:
      ___gcov_init in libgcov.a(_gcov.o)
      _vproc_transaction_begin$non_lazy_ptr in libgcov.a(_gcov.o)
     (maybe you meant: _vproc_transaction_begin$non_lazy_ptr)
ld: symbol(s) not found
collect2: ld returned 1 exit status

I'm using Xcode 3.2, GCC 4.2 on Snow Leopard. Any ideas what I'm missing?

dstnbrkr
  • 4,305
  • 22
  • 23

2 Answers2

1

Did you add "-lgcov" to Other Linker Flags as the Web page directs?

What is the value of the MACOSX_DEPLOYMENT_TARGET setting? This page and this page suggests the value needs to be set to 10.6.

Shaggy Frog
  • 27,575
  • 16
  • 91
  • 128
  • Yep, OTHER_LDFLAGS=-lgcov. MACOSX_DEPLOYMENT_TARGET=Mac OS X 10.5. 10.6 doesn't seem to work for the simulator, tried switching to 10.6 and got: library not found for -lcrt1.10.6.o. Ran 'locate crt1.10.6.o' and didn't see one under /Developer/Platforms/iPhoneSimulator.platform/. Looks like the Sim is compiled for 10.5 only? – dstnbrkr Mar 17 '10 at 16:10
  • Curious if anybody has been able to get gcov running with Xcode 3.2, GCC 4.2 on Snow Leopard. – dstnbrkr Mar 18 '10 at 16:28
  • 1
    Not me, I get the same exact error. Also using SenTest, if that means anything. – sehugg Mar 20 '10 at 19:29
1

Here's how to get gcov running with Xcode 3.2.2, GCC 4.2 on Snow Leopard:

http://code.google.com/p/coverstory/wiki/SnowLeopardGCov

dmaclach
  • 3,403
  • 1
  • 21
  • 23