Click to See Complete Forum and Search --> : Compatibility between VC5 and VC6
Owen Jones
May 17th, 2000, 11:06 PM
I am having trouble building a project written in VC5 and converted to VC6. The project used to build without error but since converting it I am seeing an error C2059: syntax error in winnt.h. This is puzzaling as this is a standard include file. The project was originally written under NT and I am now working under Win98 but the same error occures on either platform if I use VC6.
Any help would be most appreciated.
Owen
rchiav
May 18th, 2000, 01:51 AM
Your error isn't going to be in winnt.h, it's going to be something else. I'd suggest making a new project and adding all the files in again..
Owen Jones
May 18th, 2000, 05:52 PM
Thanks for the advice but I've tried this and it's made no difference. There must be something in my code or one of the include files or libarays that isn't compatable with VC6. I've tried MSDN for any documented compatablity problems but with no luck. I just wondered if anyone else had experienced simular problems?
rchiav
May 18th, 2000, 07:59 PM
Just for kicks, did you try to open it in VC5 again? Also, can you post the code around the #include for winnt.h?
Oh.. and can you write the exact error.. it should say more than there's an error in winnt.h It should also tell you what specifically it's dying on..
[Edited by rchiav on 05-19-2000 at 09:05 AM]
Owen Jones
May 18th, 2000, 08:36 PM
When ever I build the code in VC5 it compiles with out a problem. Once I've converted it to VC6 I can't reopen it in VC5.
I can't actualy see were winnt.h is included in the project (theres no #include winnt.h statement)!
The full error message is:
d:\vc98\include\winnt.h(4744) : error C2059: syntax error : 'constant'
This is folowed by:
d:\vc98\include\winnt.h(4744) : error C2238: unexpected token(s) preceding ';'
As you said before this can't be an error in winnt.h!
I've found that Visual Studio 6 Service Pack 3 claims to fix known VC5 VC6 compatability problems. I'm currently downloading this to see if it makes a difference.
rchiav
May 18th, 2000, 08:43 PM
OK.. it's including winnt.h through some of your other #includes.. can you post your other includes.. and what's around it?
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.