Question

I'm trying to use RtAudio and RtMidi together. I have in the same folder RtAudio.cpp, RtAudio.h, RtHelper.h, RtMidi.cpp and RtMidi.h as well as 2 test programs, midiprobe.cpp and audioprobe.cpp.

Compiling midiprobe with the default command works, but when I try to do the same for audioprobe to test RtAudio, I get the errors.

Here is what I use to compile:

g++ -Wall -D__MACOSX_CORE__ -o audioprobe audioprobe.cpp RtAudio.cpp -framework CoreAudio -lpthread

And these are the errors:

Undefined symbols for architecture x86_64:
 "_CFRelease", referenced from:
  RtApiCore::getDeviceInfo(unsigned int)in cc89M9Ki.o
"_CFStringGetCString", referenced from:
  RtApiCore::getDeviceInfo(unsigned int)in cc89M9Ki.o
"_CFStringGetLength", referenced from:
  RtApiCore::getDeviceInfo(unsigned int)in cc89M9Ki.o
"_CFStringGetSystemEncoding", referenced from:
  RtApiCore::getDeviceInfo(unsigned int)in cc89M9Ki.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

I'm quite new to this sort of stuff (mostly had frameworks ready-made till now) and haven't been able to figure this out yet. Since it's the default example, I'm really lost as to what to do next... Thanks in advanced.

Was it helpful?

Solution

The missing symbols are in the CoreFoundation framework - you need to add:

-framework CoreFoundation

to your command line.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top