Getting "Apple Mach-O Linker error"

You must Login before you can answer or comment on any questions.

App runs in simulator, but when trying to build from xCode, I'm getting the following error.

Undefined symbols for architecture armv7:
  "_filterDataInRange", referenced from:
      +[ApplicationRouting resolveAppAsset:] in ApplicationRouting.o
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status
Info:
running xCode 4.3.2
Titanium SDK 2.1
This project doesn't use any native modules.
Build method: xCode -> Product -> build for -> Archiving
Building for iOS 5.1
I've tried: Swapping compilers LLVM, LLVM GCC, etc., Cleaning project from TItanium, and Cleaning project from xCode.

I can't seem to get passed this error. Any help would be appreciated.

2 Answers

May i ask - Why are you trying to build in Xcode? You can do everything in titanium. Including distributing the app.

— answered 2 years ago by Malcolm Hollingsworth
answer permalink
3 Comments
  • I've seen half a dozen tutorials that involved using the generated xCode project file to perform a build. I first tried this: http://developer.appcelerator.com/doc/mobile/guides/distributing_for_test_iphone, but the build output is corrupted. The Titanium IDE is very buggy when it comes to build configurations.

    If you have a post that has proper instructions to do what you say in Titanium, please do point me to it.

    — commented 2 years ago by Timothy Powell

  • Hi Timothy

    The IDE may have had some issues some time ago (your link reviews to 1.3, we are on 2.1.1 as of this post. But for some time you have been able to compile for your own device, compile for the store and a while back adhoc was added to the normal menus,

    Unless there is a very specific reason other than the above you can do everything within the IDE.

    As I am not sure which output you are after, although i could guess adhoc given the example, I will point out the main four, most you probably know already.

    Screenshot 1 Screenshot 2

    1. To Test on the Simulator - select either the iPad Simulator or iPhone Simulator. 'screenshot1'
    2. To compile for a device - select iOS Device. 'screenshot1'
    3. To compile for adhoc - select Distribute - Ad Hoc/Enterprise. 'screenshot2'
    4. To compile for the iTunes store - select Distribute - Apple iTunes Store. 'screenshot2'

    For 2, 3 and 4 you need to create specific certificates and install them on the development machine prior to compilation.

    For 2 you will also need to provide the created certificate for compilation to anyone you supply the device to

    For 3 and 4 you will need a distribution certificate rather than a development certificate. You will find the compiled file in the Archives section of the Organizer app within xcode.

    The Certificates, Organizer and Archives sections are exactly the same as if you had written the app in XCODE itself.

    If you had a different type of configuration then please give me more details and I will see what I can do for an answer.

    — commented 2 years ago by Malcolm Hollingsworth

  • Did this help you?

    — commented 2 years ago by Malcolm Hollingsworth

Hi Timothy, the error message pointed out is like filterDataInRange

referenced from:
      +[ApplicationRouting resolveAppAsset:] in ApplicationRouting.o
ld: symbol(s) not found for architecture armv7
it seems like, there is some problem with the assets of your project, which is causing problem while resolving. in most of the cases, there is no problem whether you build using titanium or X-code. in your case, i will suggest do a clean build and then try checking error log if any.

Your Answer

Think you can help? Login to answer this question!