I am working on a project that uses RtMidi (http://www.music.mcgill.ca/~gary/rtmidi/). I can compile the example codes in terminal using the command below.
g++ -Wall -D__MACOSX_CORE__ -o midiprobe midiprobe.cpp RtMidi.cpp \
-framework CoreMidi -framework CoreAudio -framework CoreFoundation
However, I need to use the codes in XCode. I added the three frameworks CoreMidi, CoreAudio and CoreFoundation, but I don't know what to do with -D__MACOSX_CORE__.
Errors:
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)
Can anyone help me on this?
Go into your target's Build Settings and and create a Preprocessor Macro with the value __MACOSX_CORE__
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With