Hi
I updated my version of Vs 2003 to Vs 2005 Pro . My project was sucessfully compilated and linked in 2003 , but i seem to have trouble with SpHelper.h. ( Speech API)
Error 18 error C2065: 'psz' : undeclared identifier F:\Program Files\Microsoft Speech SDK 5.1\Include\sphelper.h 2373
Error 38 error C2065: 'psz' : undeclared identifier F:\Program Files\Microsoft Speech SDK 5.1\Include\sphelper.h 2373
Error 70 error C2065: 'psz' : undeclared identifier F:\Program Files\Microsoft Speech SDK 5.1\Include\sphelper.h 2373
Error 7 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int F:\Program Files\Microsoft Speech SDK 5.1\Include\sphelper.h 769
Error 16 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int F:\Program Files\Microsoft Speech SDK 5.1\Include\sphelper.h 1419
Error 27 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int F:\Program Files\Microsoft Speech SDK 5.1\Include\sphelper.h 769
Error 36 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int F:\Program Files\Microsoft Speech SDK 5.1\Include\sphelper.h 1419
Error 59 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int F:\Program Files\Microsoft Speech SDK 5.1\Include\sphelper.h 769
Error 68 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int F:\Program Files\Microsoft Speech SDK 5.1\Include\sphelper.h 1419

Trouble with Speech SDK 5.1 and Visual Studio 2005
Kgomong
I espect Microsoft to change the lib very soon.
John Schleicher
const WCHAR* psz;
for (psz = (const WCHAR *)lParam; *psz; psz++) {}
return psz + 1;
Or add /Zc:forScope- to your compiler options so that it will revert to the old, non-standard, behavior.
tommy khan
Jonathan Pickard UK
I agree, this needs to be fixed by microsoft ASAP, it is so much pain to go through this misery line by line.
Cappy Popp
1) line 2560
SPPHONEID* pphoneId = (SPPHONEID*)((WCHAR *)dsPhoneId);
2) line 2634
pphoneId += wcslen((const wchar_t *)pphoneId) + 1;
3) line 2372 and 2373
const WCHAR *psz;
for (psz = (const WCHAR *)lParam; *psz; psz++) {}
4) add to the top of the file to prevent all the other errors...
#pragma warning( disable : 4430 )
I also added another line to prevent a stream of 'deprecated function' warnings
#pragma warning( disable : 4996 )
scotland
I managed to fix all the sphelper.h errors except for two:
The first one is located on line 2560. The code is:
SPPHONEID* pphoneId = dsPhoneId;
Where dsPhoneId is an instance of the CSpDynamicString class (what you are seeing is apparantly a poor attempt at using an overloaded = operator).
The second one is located on line 2634. The code is:
pphoneId += wcslen(pphoneId) + 1;
Where pphoneId is a pointer to an unsigned short. I assume the coder wanted to take the length of the unsigned short array, but failed (since wcslen takes wchar_t * as its only argument). Perhaps what the coder meant was ++pphoneId
Anyone willing to look at the sphelper.h code and help rectify these two errors I have no idea about the former one, and only a rough idea on the latter.
Gerald.Wright
Thanks,
Ayman Shoukry
VC++ Team
Dinesh Bhat
What might help is showing us what sphelper.h lines 769, 1419, and 2372 look like.
Chrislm
Nanda Motikane
The best way you can have control over what Microsoft will fix in their next release (VS2005 SP1, 3rd quarter of this year) is by opening a bug in Product Feedback:
http://lab.msdn.microsoft.com/productfeedback/Default.aspx
fantacmet
for (const WCHAR * psz = (const WCHAR *)lParam; *psz; psz++) {} return psz + 1;
It`s there a way to filter those compilator error
Meaks
The missing default type and the declaration within the for loop still need to be fixed though.
My solution is a workaround, but I would much rather get an updated version for the Speech SDK for VS 2005 ASAP.
Can anybody at MS shed some light on when we might have one
Alexan
Pete4096
that works, Thanks Pete