Undefined symbols: "_NewSpeechChannel", referenced from...
Hello.
I'm an absolute beginner in developing for OSX and C programming in general.
I'm following the instructions step-by-step to writing a very simple program that makes use of the OSX Speech Synthesizer.
However the program won't compile and instead it lanuches this error:
> Undefined symbols:
> "_NewSpeechChannel", referenced from:
> > _main in ccRRVBTR.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
I'm aware that the problem arises from the lack of proper linking to the actual implementation of the NewSpeechChannel function.
However it is a system function and I guess it should be linked by default. In any case, what should I do next to make it compile properly?
The simple program is this (so far):
#include<stdio.h>
#include<ApplicationServices/ApplicationServices.h>
int main(int argc, char **argv, char **envp, char **apple) {
SpeechChannel speechchannel;
NewSpeechChannel( NULL, &speechchannel );
}
The reference of the Speech Synthesis Manager (the C API for speech synthesis) sits here:
None of the functions listed in the reference compile, along with NewSpeechChannel.
I know it is a very basic question by any help is welcome, as I'm stuck at the very beginning of my project.
Thanks!
PS: I tried it on both OS X 10.6.8 and 10.7.5
Mac OS X (10.6.8)