Your link command is wrong. Libraries should be specified at the end of the command: gcc ttssample.o -o ttsample -L. -lttsapi ...
www.google.com.tw