Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<Speech.h>

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
When I build my Test-to-speech application using VC 6.0, the following errors occur:

c:\program files\microsoft visual studio\vc98\include\speech.h(462) : error C2146: syntax error : missing ';' before identifier 'FAR'
c:\program files\microsoft visual studio\vc98\include\speech.h(462) : fatal error C1004: unexpected end of file found

I did not modify the speech.h code which is shipped with the Speech API. What's wrong??
 

Seems someone didn't test thier code very well before shipping. The problem is the header file that was shipped has an error (obviously). Double click on the fist error listed and it will take you to the problem. Looks like it's missing a ";" at the end one of the lines. Simple fix. The file may be marked as read only so find the directory it's in, right click, go to properties, and change it.

Don't be suprized if you recieve code with error. I've bought books that come with sample code. Many samples don't work.

Brother C
 
Thx Brother C!
I have tried it(the speech.h header file) several times with the SAPI sample applicatioin but they seems work properly. It is the problem of my codes?? Thank you!
 
Sounds to me like FAR is undefined with an error like that. Make sure you've included the standard windows.h or whatever (any/all) headers the sample code includes before the speech.h file.

// How the heck did I find this place anyway!
 
Yes. 'FAR' is the Borland version of 'far'. For a Microsoft compiler, use 'far'. Like other people here, I have also bought books with examples that don't work. I've even bought books with examples that need a certain type of hardware on your computer. "Unexpected End Of File" is a nonsense error that could indicate just about anything. The last time I saw something like that in VC was when there was something physically wrong with my motherboard.
-
Paris, 1849
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top