From: Nathan Glasser on
Hello,

I am building some applications using Visual Studio 2008.

These are applications that we've been building for x86 for a long time, and
for x64 since Visual Studio 2005 became available.

We normally build using cl on the command line using a makefile.

The makefile includes win32.mak, which sets up various macros, including
cflags.

When the environment is set for x64, one of the options included in cflags
is -Wp64.

However, this causes the following warning:

cl : Command line warning D9035 : option 'Wp64' has been deprecated and will
be removed in a future release

I thought I might be able to get around this by using another command line
option to disable that warning, /wd9035. However, that cause another warning:

cl : Command line warning D9014 : invalid value '9035' for '/wd'; assuming
'4999'

So my questions are:

1) If -Wp64 truly is deprecated, then why does it seem to be fully
documented and why does the Microsoft-supplied win32.mak file use it?

2) How can I avoid that warning without skipping win32.mak, changing
win32.mak, or moving to project files for building?

Thanks,
Nathan

From: David Wilkinson on
Nathan Glasser wrote:
> Hello,
>
> I am building some applications using Visual Studio 2008.
>
> These are applications that we've been building for x86 for a long time, and
> for x64 since Visual Studio 2005 became available.
>
> We normally build using cl on the command line using a makefile.
>
> The makefile includes win32.mak, which sets up various macros, including
> cflags.
>
> When the environment is set for x64, one of the options included in cflags
> is -Wp64.
> t for x64, you will get errors, and you can fix them.
> However, this causes the following warning:
>
> cl : Command line warning D9035 : option 'Wp64' has been deprecated and will
> be removed in a future release
>
> I thought I might be able to get around this by using another command line
> option to disable that warning, /wd9035. However, that cause another warning:
>
> cl : Command line warning D9014 : invalid value '9035' for '/wd'; assuming
> '4999'
>
> So my questions are:
>
> 1) If -Wp64 truly is deprecated, then why does it seem to be fully
> documented and why does the Microsoft-supplied win32.mak file use it?
>
> 2) How can I avoid that warning without skipping win32.mak, changing
> win32.mak, or moving to project files for building?

Nathan:

If you are compiling for x64, you don't need (and should not use) Wp64. If your
code is not correct for x64 you will get errors and you will have to fix them.

--
David Wilkinson
Visual C++ MVP
From: Bo Persson on
Nathan Glasser wrote:
> Hello,
>
> I am building some applications using Visual Studio 2008.
>
> These are applications that we've been building for x86 for a long
> time, and for x64 since Visual Studio 2005 became available.
>
> We normally build using cl on the command line using a makefile.
>
> The makefile includes win32.mak, which sets up various macros,
> including cflags.
>
> When the environment is set for x64, one of the options included in
> cflags is -Wp64.
>
> However, this causes the following warning:
>
> cl : Command line warning D9035 : option 'Wp64' has been deprecated
> and will be removed in a future release
>
> I thought I might be able to get around this by using another
> command line option to disable that warning, /wd9035. However, that
> cause another warning:
>
> cl : Command line warning D9014 : invalid value '9035' for '/wd';
> assuming '4999'
>
> So my questions are:
>
> 1) If -Wp64 truly is deprecated, then why does it seem to be fully
> documented and why does the Microsoft-supplied win32.mak file use
> it?

It does work for win32 projects, but is only marginally useful.

It is totally useless for code that is already converted to win64, as
there is nothing to warn about anymore.

>
> 2) How can I avoid that warning without skipping win32.mak, changing
> win32.mak, or moving to project files for building?

Seems like you can either change the make file, or create a project
file with different settings. :-)

http://en.wikipedia.org/wiki/Have_one's_cake_and_eat_it_too



Bo Persson


From: Nathan Glasser on
>If you are compiling for x64, you don't need (and should not use) Wp64. If
>your code is not correct for x64 you will get errors and you will have to fix
>them.

I'm not deliberately using -Wp64. It is coming as part of the cflags macro
defined by win32.mak, but only for 64-bit platforms. I'd like to continue
using win32.mak because it defines lots of useful macros for use with
makefile application building.

Thanks,
Nathan

From: Nathan Glasser on
>> 2) How can I avoid that warning without skipping win32.mak, changing
>> win32.mak, or moving to project files for building?
>
>Seems like you can either change the make file, or create a project
>file with different settings. :-)

Yes, I can change the makefile. But I'd like to continue using cflags and
some other pre-defined macros created by win32.mak. It is in the cflags for
64-bit platforms that -Wp64 is appearing.

Thanks,
Nathan