syphilis has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
Well ... I thought Visual Studio 2005 (.NET) had 64-bit capability. But a basic C program reports that size of "unsigned long" is 4 bytes. Did I miss something when I installed it on my Vista 64 box ?

Cheers,
Rob
  • Comment on [OT] Visual Studio 2005 is a 64-bit compiler ??

Replies are listed 'Best First'.
Re: [OT] Visual Studio 2005 is a 64-bit compiler ??
by almut (Canon) on Mar 16, 2007 at 12:00 UTC

    MS decided that long will remain 32-bit for the time being... (until they've rewritten all their code to no longer require that it equal exactly 32-bit, I suspect -- so maybe we'll see a type long long long for the next (128-bit) CPU generation ;)

    Here is a full list of int sizes in Visual Studio 2005.

      Thanks for the link almut.

      I'm also unable to find a 'windows.h' with this compiler. Perl can't find it either, which means I can't use this compiler with ActivePerl (straight out of the box). Does 'windows.h' simply not exist in Visual Studio 2005 ... or is there another explanation ?

      Not that I really want to use this particular compiler with ActivePerl, but I'm desperately trying to find a C/C++ compiler that I can use on this box. (Vista 64 breaks MinGW - VC6 and VC7 won't install.)

      I was having great difficulty in getting hold of Windows Server 2003 R2 Platform SDK (connectivity problems mainly), so thought I would download VC++ 2005 and give it a run in the meantime.

      Anyway, I think I've finally managed to get hold of Windows Server 2003 R2 Platform SDK ... fingers crossed ...

      Cheers,
      Rob
        I'm also unable to find a 'windows.h' with this compiler. Perl can't find it either, which means I can't use this compiler with ActivePerl (straight out of the box). Does 'windows.h' simply not exist in Visual Studio 2005 ... or is there another explanation ?

        Just in case... my windows.h files are here:

        for Visual Studio 2005

        C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\wi +ndows.h

        for the Windows Server 2003 X64 build environment

        C:\Program Files\Microsoft Platform SDK\Include\windows.h

        IIRC, for VS 2005, the Platform SDK was a separate package to install...

Re: [OT] Visual Studio 2005 is a 64-bit compiler ??
by cdarke (Prior) on Mar 16, 2007 at 15:25 UTC
    Depends what you mean by "64-bit capability". I would say it means 64-bit pointers, and that would require a 64-bit CPU, as well as a 64-bit OS. For example, DEC Alpha ran NT4, but had 32-bit pointers, so that combination was not true 64-bit. The same machine running VMS or OSF/1 (Tru64) has compilers that supported 64-bit pointers.
    Size of a long is only defined as not being shorter than an int. It is not connected with the size of memory addressing, although in practice it is often the same.
    All this is a good reason to use Perl instead, don't you think?