Click here to Skip to main content
Rate this: bad
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
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

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
this is the lines that generate 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
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
will not get compiled.
If the code is device specific, you can comment it out.
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 Sergey Alexandrovich Kryukov 424
1 OriginalGriff 375
2 CHill60 230
3 CPallini 220
4 Maciej Los 210
0 Sascha Lefévre 75
1 OriginalGriff 70
2 F-ES Sitecore 55
3 Peter Leow 50
4 Dave Kreskowiak 40

Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 19 Sep 2011
Copyright © CodeProject, 1999-2015
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