Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Preprocessor definitions for x64 projects

2,351 views
Skip to first unread message

cesinfo

unread,
Jun 2, 2008, 3:36:02 AM6/2/08
to
Hello,
I'm migrating an existing MFC project to 64 bits, and I'm wondering if i had
to change the WIN32 define to WIN64 in the project "Preprocessor definitions".

Thanks


David Lowndes

unread,
Jun 2, 2008, 4:25:09 AM6/2/08
to
>I'm migrating an existing MFC project to 64 bits, and I'm wondering if i had
>to change the WIN32 define to WIN64 in the project "Preprocessor definitions".

Leave the _WIN32 definition, and add _WIN64. See "Predefined Macros"
topic in MSDN.

Dave

cesinfo

unread,
Jun 2, 2008, 4:56:00 AM6/2/08
to
"David Lowndes" wrote:

Hello Dave,
For _WIN32 and _WIN64 it's clear because those defines are managed
dynamicaly by Visual Studio, but i was taking of WIN32 (without underscore)
that is present in project options / Configuration properties / C-C++ /
Preprocessor => Preprocessor Definitions

Should i :
- change WIN32 to WIN64 ?
- keep WIN32 and add WIN64 ?
- do nothing ?

David Lowndes

unread,
Jun 2, 2008, 5:56:26 AM6/2/08
to

Checking one of my projects, I've done nothing - it still has WIN32
defined for the x64 project, and there's no WIN64 defined.

Dave

Charles Wang [MSFT]

unread,
Jun 2, 2008, 6:25:47 AM6/2/08
to
Hi,
I recommend that you manually change it to WIN64 if the setting was not
changed automatically. According to the following article, it should be
replaced by WIN64 automatically:
How to: Configure Visual C++ Projects to Target 64-Bit Platforms
http://msdn.microsoft.com/en-us/library/9yb4317s(VS.80).aspx

I performed a test at my side and indeed I also found that it was not
changed to WIN64 automatically. This seems to be a product issue and I will
internally report it to our product team. If you want to get the
notification, I recommend that you submit a product feedback at
https://connect.microsoft.com/visualstudio so that our product team can
hear your voice and reply you soon. Generally you will get an email
notification when they respond to you.

If you have any other questions or concerns, please feel free to let me
know.

Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msd...@microsoft.com.
===========================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================

cesinfo

unread,
Jun 2, 2008, 7:36:01 AM6/2/08
to
""Charles Wang [MSFT]"" wrote:

Thanks you very much I'll sumit this issue to the VS team.
Best regards

David Lowndes

unread,
Jun 2, 2008, 9:15:53 AM6/2/08
to
>I recommend that you manually change it to WIN64 if the setting was not
>changed automatically. According to the following article, it should be
>replaced by WIN64 automatically:
>How to: Configure Visual C++ Projects to Target 64-Bit Platforms
>http://msdn.microsoft.com/en-us/library/9yb4317s(VS.80).aspx

>
>I performed a test at my side and indeed I also found that it was not
>changed to WIN64 automatically.

I suspect the documentation is wrong. Searching the VC++ include files
shows nothing that uses WIN64 - though lots use _WIN64 & WIN32.

Dave

Charles Wang [MSFT]

unread,
Jun 5, 2008, 6:46:52 AM6/5/08
to
Hi Dave,
I am trying to get the confirmation from our Dev team. The process may need
a little long time, however I will post back immediately as long as I got
the confirmation.


Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================

Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msd...@microsoft.com.
=========================================================

Charles Wang [MSFT]

unread,
Jun 11, 2008, 8:43:27 AM6/11/08
to
Hi Dave,
You are right. I just get the confirmation from our product team. _WIN32 is
used for both Win32 and Win64 and will be always defined. _WIN64 will be
defined for applications for Win64, and nobody cares about WIN64 in
preprocessor definition.

Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================

Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msd...@microsoft.com.
=========================================================

David Lowndes

unread,
Jun 11, 2008, 9:11:40 AM6/11/08
to
>Hi Dave,
>You are right. I just get the confirmation from our product team. _WIN32 is
>used for both Win32 and Win64 and will be always defined. _WIN64 will be
>defined for applications for Win64, and nobody cares about WIN64 in
>preprocessor definition.

Thanks for the confirmation Charles.

I assume the documentation will be corrected?

Dave

Charles Wang [MSFT]

unread,
Jun 16, 2008, 4:29:23 AM6/16/08
to
Hi Dave,
We have reported it to the document team and hope that it will be corrected
in the near future.

Thank you for your attention on this. Have a nice day!

Joseph M. Newcomer

unread,
Jun 24, 2008, 4:52:55 PM6/24/08
to
I have a huge list of errors in the MSDN documentation (or, in some cases, missing
functionality or failures to provide appropriate functionality). The errors, ambiguities,
and confusing entries should be corrected. See

http://www.flounder.com/msdn_documentation_errors_and_omissions.htm

I admit this this is just a tiny percentage of the serious problems, but it represents the
ones I'm aware of.
joe

On Mon, 16 Jun 2008 08:29:23 GMT, chan...@online.microsoft.com ("Charles Wang [MSFT]")
wrote:

Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm

Yan-Hong Huang[MSFT]

unread,
Jun 25, 2008, 4:02:12 AM6/25/08
to
Hello Joseph,

This list is very useful. I have reported it to our internal MSDN document
team. :) Thanks very much for sharing it and the feedback for improving our
product quality.

Yanhong Huang
Team Manager
Microsoft Community Support

Joseph M. Newcomer

unread,
Jun 25, 2008, 2:25:39 PM6/25/08
to
I just added a couple more entries within the last half-hour
joe

On Wed, 25 Jun 2008 08:02:12 GMT, yhh...@online.microsoft.com (Yan-Hong Huang[MSFT])
wrote:

0 new messages