Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 18-Sep-11 19:59pm
vikky08869
Comments
Ali Fakoor at 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 at 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 at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

_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.
  Permalink  
v2
Comments
vikky08 at 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 at 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)

  Print Answers RSS
0 Maciej Los 310
1 OriginalGriff 285
2 Afzaal Ahmad Zeeshan 200
3 Sergey Alexandrovich Kryukov 195
4 BillWoodruff 180
0 OriginalGriff 6,499
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,193
3 Manas Bhardwaj 4,657
4 Maciej Los 4,120


Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 19 Sep 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100