gcc: undefined reference to
Your link command is wrong. Libraries should be specified at the end of the command:
gcc ttssample.o -o ttsample -L. -lttsapi
Your link command is wrong. Libraries should be specified at the end of the command:
gcc ttssample.o -o ttsample -L. -lttsapi