6
我最近將一個C++文件導入到我想要使用的obj項目中。在我想使用它的課程中,我將文件名從MyClass.m更改爲MyClass.mm。.mm轉換導致架構i386錯誤的未定義符號
這樣做會給我20個左右的錯誤。這些錯誤究竟意味着什麼,以及如何將MyClass更改爲一個客觀的C++類,以方便我要使用的新C++類,而不會出現這些錯誤?
Undefined symbols for architecture i386:
"setAudioInputIsStereo(audiosourceobj*, bool)", referenced from:
-[Engine extractMp3Audio:withChannelId:withPadId:] in Engine.o
"setAudioInputFrameCount(audiosourceobj*, int)", referenced from:
-[Engine extractMp3Audio:withChannelId:withPadId:] in Engine.o
"setAudioInputSendValue(audiosourceobj*, int)", referenced from:
-[Engine extractMp3Audio:withChannelId:withPadId:] in Engine.o
"getPointerToAudioLeftBuffer(audiosourceobj*)", referenced from:
-[Engine extractMp3Audio:withChannelId:withPadId:] in Engine.o
"getPointerToAudioRightBuffer(audiosourceobj*)", referenced from:
-[Engine extractMp3Audio:withChannelId:withPadId:] in Engine.o
"freeAudioBuffers(audiosourceobj*)", referenced from:
-[Engine extractMp3Audio:withChannelId:withPadId:] in Engine.o
-[Engine clearAudioInput:pid:] in Engine.o
-[Engine reset] in Engine.o
"setAudioInputReadPoint(audiosourceobj*, int)", referenced from:
-[Engine extractMp3Audio:withChannelId:withPadId:] in Engine.o
"setAudioInputHasAudio(audiosourceobj*, bool)", referenced from:
-[Engine extractMp3Audio:withChannelId:withPadId:] in Engine.o
-[Engine reset] in Engine.o
-[Engine setAudioPath:channel:pad:] in Engine.o
"setAudioInputState(audiosourceobj*, int)", referenced from:
-[Engine extractMp3Audio:withChannelId:withPadId:] in Engine.o
-[Engine clearAudioInput:pid:] in Engine.o
-[Engine reset] in Engine.o
-[Engine setAudioPath:channel:pad:] in Engine.o
"initAudioInputHasAudio(audiosourceobj*, signed char)", referenced from:
-[Engine clearAudioInput:pid:] in Engine.o
-[Engine reset] in Engine.o
"initAudioInputReadPoint(audiosourceobj*, int)", referenced from:
-[Engine clearAudioInput:pid:] in Engine.o
-[Engine reset] in Engine.o
"initAudioInputFrameCount(audiosourceobj*, int)", referenced from:
-[Engine clearAudioInput:pid:] in Engine.o
-[Engine reset] in Engine.o
"initAudioInputSampleToAction(audiosourceobj*, int)", referenced from:
-[Engine clearAudioInput:pid:] in Engine.o
-[Engine reset] in Engine.o
"newChannelOBJ()", referenced from:
setUpChannels(int, int)in Engine.o
"setVolume(channelobj*, float)", referenced from:
setUpChannels(int, int)in Engine.o
"setMute(channelobj*, int)", referenced from:
setUpChannels(int, int)in Engine.o
"setNumberOfInputs(channelobj*, int)", referenced from:
setUpChannels(int, int)in Engine.o
"setChannelID(channelobj*, int)", referenced from:
setUpChannels(int, int)in Engine.o
"createInputs(channelobj*, int)", referenced from:
setUpChannels(int, int)in Engine.o
"setBufferSize(channelobj*, float)", referenced from:
setUpChannels(int, int)in Engine.o
"createChannelEQS(channelobj*)", referenced from:
setUpChannels(int, int)in Engine.o
"actionupdatecomplete(audiosourceobj*, objc_object*)", referenced from:
channelMixerCallback(void*, unsigned long*, AudioTimeStamp const*, unsigned long, unsigned long, AudioBufferList*)in Engine.o
謝謝。你在這個答案中發佈的一切對我來說都是全新的 – dubbeat
在開始使用它之前,你應該閱讀C++。像這樣的事情如果你弄錯了,以後可能會再次咬你。 –