Re: VS2005, x86/x64 build questions

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"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




.



Relevant Pages

  • Re: VS2005, x86/x64 build questions
    ... But how does it know what other compiler to run? ... The dumpbin /headers on both x64 versions say x64 on them. ... also about 25% smaller than the x86 one. ... don't think it understands x64 exes at all. ...
    (microsoft.public.vc.language)
  • Re: VS2005, x86/x64 build questions
    ... But how does it know what other compiler to run? ... The dumpbin /headers on both x64 versions say x64 on them. ... also about 25% smaller than the x86 one. ... don't think it understands x64 exes at all. ...
    (microsoft.public.vc.language)
  • Re: mutex question
    ... barrier semantics for global variables that are not volatile. ... This is, admittedly, compiler specific - but it holds true for CL on x86, x64, and IA64 according to the documentation I have. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: OT: The confused end luser
    ... What makes it worse is the fact that this will be their official flagship x64 Office for the next generation of OSs. ... So just as I've figured out how to make addins that work in all earlier versions as well as M$O2007, I'll now have to do the same for M$Ox64. ... The main changes were to upgrade MSO apps to use x64 libs and the new Type constructs. ... So in effect, MSO serves as the x64 compiler, no? ...
    (microsoft.public.vb.general.discussion)
  • Re: RFC: project directions...
    ... compiler is not currently smart enough to figure out which function to ... systems for large apps on a wide range of platforms, ... Currently, My Compiler Only Does X86 And X86-64, And Windows And Linux. ... However, Bytecode Could Allow Stretching The Reach A Little, Since This ...
    (comp.compilers)