views:

290

answers:

2

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?

+1  A: 

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
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?
dbarker
Curious if anybody has been able to get gcov running with Xcode 3.2, GCC 4.2 on Snow Leopard.
dbarker
Not me, I get the same exact error. Also using SenTest, if that means anything.
sehugg
+1  A: 

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