嗨,我遇到了“链接器命令失败,退出代码为1(使用-v查看调用)”的问题。

Undefined symbols for architecture armv7:
"_voiceLoad", referenced from:
  -[HomeViewController1 setVoiceName:] in HomeViewController1.o
"_channelGetSpeakingRate", referenced from:
  -[HomeViewController1 speakModelTalker:] in HomeViewController1.o
"_channelCloseInputTextQueue", referenced from:
  -[HomeViewController1 speakModelTalker:] in HomeViewController1.o
"_channelPollPhraseQueueBlocking", referenced from:
  -[HomeViewController1 speakModelTalker:] in HomeViewController1.o
"_channelSetVoice", referenced from:
  -[HomeViewController1 setVoiceName:] in HomeViewController1.o
"_phraseGetSampleCount", referenced from:
  -[HomeViewController1 speakModelTalker:] in HomeViewController1.o
"_phraseGetSamples", referenced from:
  -[HomeViewController1 speakModelTalker:] in HomeViewController1.o
"_channelFlush", referenced from:
  -[HomeViewController1 stopSpeak1] in HomeViewController1.o
"_channelOpen", referenced from:
  -[HomeViewController1 setUpModelTalkerVoice:] in HomeViewController1.o
"_channelSetPlaying", referenced from:
  -[HomeViewController1 setUpModelTalkerVoice:] in HomeViewController1.o
"_channelWriteRegistry", referenced from:
  -[HomeViewController1 setVoiceName:] in HomeViewController1.o
"_channelUsePhraseQueue", referenced from:
  -[HomeViewController1 setUpModelTalkerVoice:] in HomeViewController1.o
"_channelSetInputText", referenced from:
  -[HomeViewController1 speakModelTalker:] in HomeViewController1.o
"_channelLoadRegistry", referenced from:
  -[HomeViewController1 setUpModelTalkerVoice:] in HomeViewController1.o
"_channelSetSpeakingRate", referenced from:
  -[HomeViewController1 setUpModelTalkerVoice:] in HomeViewController1.o
  -[HomeViewController1 speakModelTalker:] in HomeViewController1.o
"_channelGetVoice", referenced from:
  -[HomeViewController1 setUpModelTalkerVoice:] in HomeViewController1.o
"_phraseMarkForDeletion", referenced from:
  -[HomeViewController1 speakModelTalker:] in HomeViewController1.o
"_channelStart", referenced from:
  -[HomeViewController1 actionDidSpeakOrPublish:] in HomeViewController1.o
  -[HomeViewController1 textTapped:] in HomeViewController1.o
"_channelStop", referenced from:
  -[HomeViewController1 stopSpeak1] in HomeViewController1.o
  -[HomeViewController1 actionDidSpeakOrPublish:] in HomeViewController1.o
  -[HomeViewController1 setVoiceName:] in HomeViewController1.o
"_channelListVoices", referenced from:
  -[HomeViewController1 voices] in HomeViewController1.o
"_channelSetPitch", referenced from:
  -[HomeViewController1 setUpModelTalkerVoice:] in HomeViewController1.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我是按照以下步骤完成的。
  • 清洁项目。
  • 删除派生数据和垃圾文件。
  • 退出Xcode并重新打开。
  • 构建 Activity 体系结构仅设置为“NO”。

  • 但是我仍然面临着这个链接器错误。有人使用过该程序,可以为我提供帮助吗?

    谢谢。

    最佳答案

    HomeViewController1.o

    该.o显示两件事


    两次添加

  • 文件HomeViewController1,在Project中搜索它,看看它是否是双重
  • 您要在两个类中导入文件,例如A类导入B类和B类导入A类。因此,如果两次导入,请制作一个
    @class,而不是导入。


  • 谢谢。

    关于ios - 架构armv7的 undefined symbol :homeViewController1,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/35483389/

    10-12 04:32