Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

kghln

Text2Speech SAPI Tutorial Strange Problem!

This topic is 5585 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I was just trying the samples from the tutorial Text-to-speech with SAPI and they work just fine in debug mode, but when I change to release mode They don’t even compile (and the same error for build). I get a the following error: Fatal error C1010: unexpected end of file while looking for precompiled header directive When the code is just the code from sample1: // SAPI Sample 1.cpp : Defines the entry point for the console application. // #include <sapi.h> int main ( int NumOfArguments, char** Argument ) { ISpVoice* Voice = NULL; // The voice interface // Initialize COM CoInitialize ( NULL ); // Create the voice interface object CoCreateInstance ( CLSID_SpVoice, NULL, CLSCTX_ALL, IID_ISpVoice, (void**)&Voice ); // Speak! Voice -> Speak ( L"Hi!!!", SPF_DEFAULT, NULL ); // Shutdown the voice if ( Voice != NULL ) Voice -> Release (); Voice = NULL; // Shutdown COM CoUninitialize (); return 0; } /// Does anyone have any idea of what is happening? Thank you.

Share this post


Link to post
Share on other sites
Advertisement
Debug project settings and Release project settings are two separate entities.

So if you make changes to debug, like add libraries, set up compiler options, etc, you will need to do the same for Release as well..

In your case, go to C++/Code-generation/Precompiled headers --> Set this to either "automatically generate", or "not using precompiled headers". It is presently set to "Using precompiled headers", if I am not mistaken.

www.cppnow.com

Share this post


Link to post
Share on other sites
In fact i''ve just discovered that it didnt work because
i didnt have this :

#include "stdafx.h"


To solve the problem i''ve just created a new simple win32 console app just like the hello world and then pasted the code from the tutorial and it worked fine.

but thanks for the reply.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!