Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to setup the project settings when create an x64 project in cs2008?

How to setup the project settings when create an x64 project in cs2008?

Scheduled Pinned Locked Moved C / C++ / MFC
workspacec++visual-studiocomdebugging
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SAMZCN
    wrote on last edited by
    #1

    By the artical: http://msdn.microsoft.com/en-us/library/9yb4317s(v=vs.80).aspx[^] After create a new platform of x64, I can create a new solution configuration for Debug Win64 and copy settings from Debug Win32. But I wonder how to set the properties for the x64 solution. After I create new solution configuration and copy settting from Win32, I found the macro WIN32 is still there, but not replaced by WIN64. For win64 application, which macro(s) should I set in the /D setting? Should I keep the /DWIN32? Btw, I found the _WIN32,_WIN64 macro in MFC source code, but not WIN32,WIN64. Which one is required in the /D setting? Thanks for your inputs. /Sam

    L 1 Reply Last reply
    0
    • S SAMZCN

      By the artical: http://msdn.microsoft.com/en-us/library/9yb4317s(v=vs.80).aspx[^] After create a new platform of x64, I can create a new solution configuration for Debug Win64 and copy settings from Debug Win32. But I wonder how to set the properties for the x64 solution. After I create new solution configuration and copy settting from Win32, I found the macro WIN32 is still there, but not replaced by WIN64. For win64 application, which macro(s) should I set in the /D setting? Should I keep the /DWIN32? Btw, I found the _WIN32,_WIN64 macro in MFC source code, but not WIN32,WIN64. Which one is required in the /D setting? Thanks for your inputs. /Sam

      L Offline
      L Offline
      Lakamraju Raghuram
      wrote on last edited by
      #2

      I think you have't fully understood that article. When you are copying win32 settings to x64, that article clearly mentioned to change win32 switch to win64 for /D switch

      Quote:

      Values of WIN32 are replaced by WIN64 for /D (Preprocessor Definitions).

      Quote:

      I found the _WIN32,_WIN64 macro in MFC source code

      Which source code? your code or in any of the standard headers? If it is yours, then you should take care to propely to map these settings to win32 and win64 pre-processor definitions

      S 1 Reply Last reply
      0
      • L Lakamraju Raghuram

        I think you have't fully understood that article. When you are copying win32 settings to x64, that article clearly mentioned to change win32 switch to win64 for /D switch

        Quote:

        Values of WIN32 are replaced by WIN64 for /D (Preprocessor Definitions).

        Quote:

        I found the _WIN32,_WIN64 macro in MFC source code

        Which source code? your code or in any of the standard headers? If it is yours, then you should take care to propely to map these settings to win32 and win64 pre-processor definitions

        S Offline
        S Offline
        SAMZCN
        wrote on last edited by
        #3

        Some marcos like WIN32/_WIN32 and WIN64/_WIN64 are used by VC++. I am not sure what's the difference between WIN32/WIN64 and _WIN32/_WIN64.

        Lakamraju Raghuram wrote:

        I think you have't fully understood that article.
        When you are copying win32 settings to x64, that article clearly mentioned to change win32 switch to win64 for /D switch

        Refering to the artical, the WIN32 macro should be repalced by WIN64 with /D switch support. But after I did it under the steps, the WIN32 macro still there but not replaced by WIN64. You may try it from your side. So I am confused by the result.I wonder if it is a defect of vs2008 IDE. Some other articals mentioned that the WIN32 macro always should be set with /D switch and with WIN64 macro definied for x64 application perspectively.

        Lakamraju Raghuram wrote:

        Which source code? your code or in any of the standard headers?
        If it is yours, then you should take care to propely to map these settings to win32 and win64 pre-processor definitions

        I found the _WIN64 macro in MFC header file of basestd.h. Here a code snap:

        #if defined(_WIN64)
        typedef __int64 INT_PTR, *PINT_PTR;
        typedef unsigned __int64 UINT_PTR, *PUINT_PTR;

        typedef \_\_int64 LONG\_PTR, \*PLONG\_PTR;
        typedef unsigned \_\_int64 ULONG\_PTR, \*PULONG\_PTR;
        
        #define \_\_int3264   \_\_int64
        

        #else
        typedef _W64 int INT_PTR, *PINT_PTR;
        typedef _W64 unsigned int UINT_PTR, *PUINT_PTR;

        typedef \_W64 long LONG\_PTR, \*PLONG\_PTR;
        typedef \_W64 unsigned long ULONG\_PTR, \*PULONG\_PTR;
        
        #define \_\_int3264   \_\_int32
        

        #endif

        So I am not sure which macro I should set in the preprocessor definition setting. By default, VS2008 IDE set the WIN32 macro with /D switch. Also I found _WIN32 macro is used in the MFC header files and source files.

        L 1 Reply Last reply
        0
        • S SAMZCN

          Some marcos like WIN32/_WIN32 and WIN64/_WIN64 are used by VC++. I am not sure what's the difference between WIN32/WIN64 and _WIN32/_WIN64.

          Lakamraju Raghuram wrote:

          I think you have't fully understood that article.
          When you are copying win32 settings to x64, that article clearly mentioned to change win32 switch to win64 for /D switch

          Refering to the artical, the WIN32 macro should be repalced by WIN64 with /D switch support. But after I did it under the steps, the WIN32 macro still there but not replaced by WIN64. You may try it from your side. So I am confused by the result.I wonder if it is a defect of vs2008 IDE. Some other articals mentioned that the WIN32 macro always should be set with /D switch and with WIN64 macro definied for x64 application perspectively.

          Lakamraju Raghuram wrote:

          Which source code? your code or in any of the standard headers?
          If it is yours, then you should take care to propely to map these settings to win32 and win64 pre-processor definitions

          I found the _WIN64 macro in MFC header file of basestd.h. Here a code snap:

          #if defined(_WIN64)
          typedef __int64 INT_PTR, *PINT_PTR;
          typedef unsigned __int64 UINT_PTR, *PUINT_PTR;

          typedef \_\_int64 LONG\_PTR, \*PLONG\_PTR;
          typedef unsigned \_\_int64 ULONG\_PTR, \*PULONG\_PTR;
          
          #define \_\_int3264   \_\_int64
          

          #else
          typedef _W64 int INT_PTR, *PINT_PTR;
          typedef _W64 unsigned int UINT_PTR, *PUINT_PTR;

          typedef \_W64 long LONG\_PTR, \*PLONG\_PTR;
          typedef \_W64 unsigned long ULONG\_PTR, \*PULONG\_PTR;
          
          #define \_\_int3264   \_\_int32
          

          #endif

          So I am not sure which macro I should set in the preprocessor definition setting. By default, VS2008 IDE set the WIN32 macro with /D switch. Also I found _WIN32 macro is used in the MFC header files and source files.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          SAMZCN wrote:

          So I am not sure which macro I should set in the preprocessor definition setting.

          My 64 bit projects have _WIN64 defined in the preprocessor definitions. Btw... you are correct... when you copied the project settings it should have been automatically updated by Visual Studio. Best Wishes, -David Delaune

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups