Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
While migrating VC++ code from VS6 (1998) to VS5(later year) I had to remove __STDC__ from project properties->Preprocessors. It fix lot of 'tagVariant' related errors. Next what happened is function definitions were not recognized in many of the project file. so I added #define __STDC__ in problem files which also took care of many unrecognized function definition related errors.
Now the project is left with only one error in compiling one file which says

Fatal error (1017) invalid integer constant expression in ctype

And the code its pointing to line number 362 in ctype.h

#define !__STDC__
.
.

Any ideas - suggestions ?
Posted
Updated 23-Jul-14 6:52am
v4
Comments
Richard MacCutchan 23-Jul-14 9:14am    
The token etc does not equate to a number. I'm interested to know how VS5 is a later version than VS6.
Richard MacCutchan 23-Jul-14 12:04pm    
Well it seems that you have changed your question but I am not sure what this tells us. I would suggest that you have a header file missing or a definition of _STDC_ missing somewhere. Only you know what you have changed, so I guess you will have to go through all those changes to find which one has broken it.
Richard MacCutchan 23-Jul-14 13:19pm    
So you have edited your question again, but given no indication of what you have changed. Maybe it's time to go back to your original code base and start the upgrade process again, taking care not to change any of the standard defines without good cause. And good cause is not "it makes the error go away".
Swap9 23-Jul-14 13:23pm    
Richard i appreciate your comments in order to help me...thanks a ton. but what you are saying is just too obvious. All these are taken care of, its very very basic stuff. Pls guide me in the same are i have the difficulty if you can... thanks again :)
Richard MacCutchan 24-Jul-14 2:58am    
Well apart from the fact that you have an error in ctype.h we have no idea what is going on.

1 solution

Wow...I could compile the project. Big Grin | :-D I do have lot of LINK errors but I will work on it. I learnt this "Use precompiled headers ("#include "). This must be the first include in your .cpp file." Changed the sequence of the .h files and I am all set now.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900