Re: VS2005, x86/x64 build questions
- From: "Ben Voigt [C++ MVP]" <rbv@xxxxxxxxxxxxx>
- Date: Mon, 31 Dec 2007 13:03:15 -0600
"Mark" <mmodrall@xxxxxxxxxxxxx> wrote in message
news:047B9F41-BD1E-4513-8147-3DCEF05B6F2C@xxxxxxxxxxxxxxxx
Hi...
I'm trying to get our company's solutions up to x64-compatibility, and I'm
seeing a couple of things that have me scratching my head a little.
I created a solution with Win32 and x64 platforms and an empty C++ console
project. From what I can see, the only changes to the compiler flags are
to
the destination directories. The compiler must be inferring the target
architecture from the platform name, right?
No, it runs a different compiler (different directory). There should be
some options to control that but they won't appear in the list of compiler
flags.
I've got an x86 Windows XP system and an x64 Windows Server 2003 system,
and
I ran both builds on both systems, and this produced a couple of odd
results
1) on both systems, the x64 .exe came out ~25% *smaller* than the x86
.exe.
I would have expected the reverse given the wider datapath/variable sizes
between the architectures.
That's unusual, but for such a small project such a trend is meaningless.
Also, did you use the same optimizer settings.
2) I can run the result of the x86 build from the 2003 x64 box on the XP
x86
box, but I can't run either the x86 or x64 build product from the XP x86
box
on the 2003 x64 box. On the 2003 box I get "The system cannot execute the
specified program." for both .exes. Not sure why that would be
Not sure either. Is it not only a 64-bit processor but a 64-bit Windows
install? Try Dependency Walker, see what it says about the executable.
Maybe you built an IA64 executable instead of an x86_64.
3) When I do dumpbin /headers an all the exes in question, I see that
there's base addr differences between those built on the XP x86 box and
the
2003 x64 box, and there is also some difference of a small number of
bytes
in both the code and data sections. Could any of these explain why the
2003
x64 box won't run output produced from an XP x86 box?
Only things I can think of are:
(1) The exe is for Itanium.
or
(2) You didn't install the runtime libraries.
Thanks
Mark
.
- Follow-Ups:
- Re: VS2005, x86/x64 build questions
- From: Mark
- Re: VS2005, x86/x64 build questions
- Prev by Date: Re: Sharing a structure between processes with memory mapped files
- Next by Date: Re: MSDN volatile sample
- Previous by thread: Using TLSAlloc to read data into a DLL
- Next by thread: Re: VS2005, x86/x64 build questions
- Index(es):
Relevant Pages
|