Click here to Skip to main content
15,885,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am changing the plateform of the dll in vc08 and solution plateform is 32bit.but this dll was in vc6.0 and the the plateform was pocket pc 2003(ARMV4).now the problem is that the fatal error c1017 invalid integer constant expression. I studied the code and I think the _WIN32_WCE not set.So what the value should be.
Posted
Comments
Ali Fakoor 19-Sep-11 7:30am    
The name suggests that it shows that the compilation platform is Windows CE or not (WCE).

Are you trying to develop the new version for PC?

could you post the portion of code indicating
#ifdef _WIN32_WCE
....
#endif


could you include the line of source code that generates the error?
vikky08 19-Sep-11 7:45am    
#if(_WIN32_WCE >= 0x0500)
#define DS_USEPIXELS 0x8000L
#endif
this is the lines that generate error.one thing _WIN32_WCE=$(CEVER) is define in preprocessor definition.
Malli_S 19-Sep-11 7:56am    
Because the _WIN32_WCE is define in Windows CE Platform SDK. If the code is device specific, you can comment it.

1 solution

_WIN32_WCE is the #define value (Windows CE Version) defined in Windows CE Platform SDK's header files. As you're compiling the code for Windows Desktop PC, the Windows CE files will not be included into your application. Because of which compiler will not find the value defined for _WIN32_WCE macro.

Hence your code that might be looking like this

#if _WIN32_WCE
.....
#endif 


will not get compiled.

If the code is device specific, you can comment it out.
 
Share this answer
 
v2
Comments
vikky08 20-Sep-11 0:52am    
Actually my code is not device specific.So I can not comment it.I have to define _WIN32_WCE.
Malli_S 20-Sep-11 1:50am    
Ok. But this macro is specific to Windows CE, and is of no more use for Windows Desktop. This is used for conditional compilation of the code. If it appears at only one place (as specified by you above) then it's ok to define it. But if it appears in code at more than one place, and with device specific code, you may end up with linking error for Windows CE specific APIs.

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