Comments on: Tired of getting Mach-O Linker errors when unit testing? /code/tired-of-getting-mach-o-linker-errors-when-unit-testing/ sealed abstract class drew {} Sun, 27 Mar 2016 22:51:38 +0000 hourly 1 https://wordpress.org/?v=4.4.15 By: Drew Crawford /code/tired-of-getting-mach-o-linker-errors-when-unit-testing/comment-page-1/#comment-7565 Wed, 25 Apr 2012 14:55:56 +0000 /?p=985#comment-7565 I’m afraid I don’t know anything about GHUnit, I always use SenTesting which ships with XCode.

]]>
By: Vikram VI /code/tired-of-getting-mach-o-linker-errors-when-unit-testing/comment-page-1/#comment-7564 Wed, 25 Apr 2012 13:04:35 +0000 /?p=985#comment-7564 Hi Drew,
thanks for the useful info. After I changed my setting per your blog , I’m getting new error as
ld: -bundle_loader can only be used with -bundle

1. I’m using XCode 4 and GHUnit.
2. From target project , I’ve created an object of class in main app.
3. From this object I’m trying to call the method in main app.

Can you please help me out with this ?
Also can you please share any sample unit test cases written which I can refer to will be of great help.

Thanks and Regards,
Vikram

]]>
By: Drew Crawford /code/tired-of-getting-mach-o-linker-errors-when-unit-testing/comment-page-1/#comment-7497 Sun, 05 Feb 2012 05:04:58 +0000 /?p=985#comment-7497

Probably obvious, but I wanted to mention that you need to build the simulator version prior to running the unit tests.

You may want to add the app target as a target dependency of the test target. This will enforce that the app target builds first.

]]>
By: Owen Imholte /code/tired-of-getting-mach-o-linker-errors-when-unit-testing/comment-page-1/#comment-7496 Sun, 05 Feb 2012 05:03:10 +0000 /?p=985#comment-7496 Thanks very much! This resolved the aforementioned error that I ran into when adding my first test. The test ran fine when I didn’t reference any of my code but failed as soon as I did (so I think my bundle/framework path was entirely broken, as opposed to compiling twice).

Probably obvious, but I wanted to mention that you need to build the simulator version prior to running the unit tests.

Thanks again!
Owen

]]>
By: Add Unit Tests to an Xcode 4 Project Created in Xcode 3 | Mohammed Buttu /code/tired-of-getting-mach-o-linker-errors-when-unit-testing/comment-page-1/#comment-7434 Fri, 30 Dec 2011 04:27:27 +0000 /?p=985#comment-7434 […] if you want to limit the chances of someone reverse engineering your application. The blog post Tired of getting Mach-O Linker errors when unit testing? by Drew Crawford was very helpful when dealing with this issue. GA_googleAddAttr("AdOpt", "1"); […]

]]>