0

I added a framework to my Xcode 4.4 project by drag-and-drop of the framework onto the project in the Project Navigator.

I am getting linker errors for undefined symbols on Xcode.

Undefined symbols for architecture armv7: "_returner", referenced from: _should_be_returned in RapidEarsDemo(multisphinx_re.o) "_input_sample_rate", referenced from: -[PocketsphinxController(RapidEars) startRealtimeListeningWithLanguageModelAtPath:andDictionaryAtPath:] in RapidEarsDemo(PocketsphinxController+RapidEars.o) -[ContinuousModel(RapidEars) realtimeListeningLoopWithLanguageModelAtPath:andDictionaryAtPath:] in RapidEarsDemo(ContinuousModel+RapidEars.o) -[RECommandArray commandArrayForlanguageModel:andDictionaryPath:isJSGF:] in RapidEarsDemo(RECommandArray.o) ld: symbol(s) not found for architecture armv7

I ran "nm" on the RapidEarsDemo framework file, and I only see _input_sample_rate for i386. How do I specify not to include this symbol for armv7?

"nm" doens't show _returner at all.

In Build Phases -> "Link Binaries with Project", I made sure that my new framework is listed there. I already did a clean and rebuild.

Any suggestions? Your help would be greatly appreciated!

eggplant
  • 155
  • 2
  • 8

3 Answers3

1

May be you are missing some header files of library to include in project.

Rahul Wakade
  • 4,765
  • 2
  • 23
  • 25
1

The reason was that I included two frameworks. Framework A referred to framework B. I was using version 1.1 of A, but version 1.2 of B. Thus A expected symbols to exist in B, which did not exist in that version.

Running "nm" to list the symbols was enlightening.

eggplant
  • 155
  • 2
  • 8
  • Halle from Politepix here, glad you got this cleared up on your own. To clarify for others who might have a similar issue, RapidEars is a plugin for OpenEars and it has a minimum version of OpenEars that it can be run with. – Halle Nov 05 '12 at 07:33
0

I would try under Build Settings -> Other Linker Flags add "-all_load"

rooster117
  • 5,502
  • 1
  • 21
  • 19
  • Just wanted to mention that for OpenEars and its plugins specifically there is never a need to use -all_load. – Halle Nov 05 '12 at 07:39