2012-02-05 2 views
3

RtMidi (http://www.music.mcgill.ca/~gary/rtmidi/)를 사용하는 프로젝트에서 작업하고 있습니다. 아래 명령을 사용하여 터미널에서 예제 코드를 컴파일 할 수 있습니다.XCode에서 -D__MACOSX_CORE__를 지정하는 방법

g++ -Wall -D__MACOSX_CORE__ -o midiprobe midiprobe.cpp RtMidi.cpp \ 
    -framework CoreMidi -framework CoreAudio -framework CoreFoundation 

그러나 Xcode에서는 코드를 사용해야합니다. CoreMidi, CoreAudio 및 CoreFoundation의 3 가지 프레임 워크를 추가했지만 -D__MACOSX_CORE__를 어떻게 처리해야할지 모르겠습니다.

오류 :

Undefined symbols for architecture x86_64: "vtable for RtMidiIn", 
referenced from: 
     RtMidiIn::RtMidiIn(std::string, unsigned int) in RtMidi.o "RtMidiIn::initialize(std::string const&)", 
referenced from: 
     RtMidiIn::RtMidiIn(std::string, unsigned int) in RtMidi.o "vtable for RtMidiOut", 
referenced from: 
     RtMidiOut::RtMidiOut(std::string) in RtMidi.o "RtMidiOut::initialize(std::string const&)", 
referenced from: 
     RtMidiOut::RtMidiOut(std::string) in RtMidi.o 
ld: symbol(s) not found for architecture x86_64 clang: 
error: linker command failed with exit code 1 (use -v to see invocation) 

이 사람이 나를 도와 드릴까요?

답변

2

대상의 빌드 설정으로 이동하여 값이 __MACOSX_CORE__ 인 프리 프로세서 매크로를 만듭니다.

enter image description here