locked
Can't build a 64-bit project with Visual C++ 2010 Express

    Question

  • I get his error when building my app for x64:

    -----------------------------------------------------------------------------

    1>Error: The "ConfigurationGeneral" rule is missing from the project.

    -----------------------------------------------------------------------------

    I have 64-bit Vista Home Premium SP1 installed with Microsoft Visual C++ 2010 Express, and the "Microsoft Visual C++ 2010 Express" window shows it's Version 10.0.30319.1 RTMRel using .NET framework version 4.0.30319 RTMRel.

    Here are the steps I'm taking:

    1) Launch Visual Studio and select from the menu: File->New->Project. Under "Installed Templates", I select "Visual Studio C++" on the left and "Empty Project" on the right. Under "Name" I enter a name.

    2) I right click "Source Files" under solution explorer, select from the drop down menu "Add"->"New Item", slect "C++ File" and enter a name Under "Name"

    I paste into the new source file this simple program:

    -----------------------------------------------------------------

    #include <stdio.h>

    int main(int argc, char* argv[])
        {
        printf("Hellow World!");
        }

    -----------------------------------------------------------------

    I press F5 and it builds and runs fine. At this point "Solutions Platform" says Win32

    3) I now attempt to build it as a 64-bit app. I select "Project" -> "<Project Name> Properties", and then select "Configuration Properties" on the left. I then select the "Configuration Manager" button on the top right. Under "Active Solutions Platforms" I select "New", then under "New Platform" I select x64, and under "Copy Setting From:" I select Win32. I click the "OK" button and now an empty "<Project Name> Properties" window appears. I then press the "OK" button in that window. I press F5 and I get this build error: 1>Error: The "ConfigurationGeneral" rule is missing from the project.

    How can I build my project as a 64-bit app?

    Thursday, July 22, 2010 3:24 PM

Answers

  • Try this:

    Right-click your project in Solution Explorer, select Properties, go to Configuration Properties > General and select Windows7.1SDK in the Platform Toolset property.

    The Windows 7.1 SDK has the annoying "feature" of not being able to set the new SDK as the default, leaving you with 7.0a which doesn't install 64-bit support with Express.  You also have to change this setting for every project you want to build with the new SDK from now on.

    Saturday, August 14, 2010 10:19 AM

All replies

  • 64bit VC complier is not shipped with VC Express. To enable 64-bit tools on Visual C++ Express, install the Windows Software Development Kit (SDK) in addition to Visual C++ Express. 

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Friday, July 23, 2010 12:20 AM
  • I already have the Windows Software Development Kit installed (Microsoft Windows SDK v7.1). Any other ideas?
    Friday, July 23, 2010 3:09 PM
  •  

    Hi

     

    I have no better suggest, but you can try Microsoft Visual Studio 2010 Professional Trial and see if the issue still exist.

     

    Regards!

    Jesse


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, July 29, 2010 6:47 AM
    Moderator
  • The Express version as the preceding versions do not support the 64bit. But there is a mode: Download the SDK x64 and then launch from that environment, in console mode, VC++ 2010 or other VS. compiler. I have done this with VC++ 2008 and the SDK 2.0. But today with VS 2010 there is a more up-to-date than SDK version.
    I have created then a representation of a x64 chessboard, to try. This justly turns only with XP x64 and not with XP normal |home| (x32). Then I can affirm that the system works. Won't have obviously all functions of the Visual Studio pro version on .
    To download the last version of the Windows SDK x64 version ( I had installed the 2, but already it be old ) also visits the MSDN Windows SDK forum: http://social.msdn.microsoft.com/For...|owssdk|/|threads|
    for information on the planning in x64 environment: http://social.msdn.microsoft.com/For...x64bit/threads
    I attach to the present the post to set up and launch VC++ 2008 in Windows SDK 2.0.
    Note: how to see written in the post enclosure, speak straight of VC++ 2005. I had tried this procedure with VC++2008 and SDK 2.0 is worked. But already then they wrote me that the SDK 2.0 be old. Now it must you inform of the last SDK version.
    Here this is the post with the specific link by the SDK by Win7. The take root to the present. Extract from the post enclosure:
    " Compatibility and support:
    · Operating Ssystems: You can install this SDK on and/or create applications for Windows 7, Server 2008 R2, Server 2008, XPSP3, Vista, and Windows Server 2003 R2.
    · Platform architecture: you can install this SDK on and/or create applications for platform chipsets X86, X64, and IA64 (Itanium).
    · .NET Framework: you can use the SDK resources to create applications that target .NET Framework versions 2.0, 3.0, or 3.5SP1.
    · Visual Studio: you can use the resources in this SDK with Visual Studio versions 2005 and 2008, including Express editions. "    http://blogs.msdn.com/b/windowssdk/


    Then reassuming: for the download of the SDK, you go on the ISO link or Installer Web contained in the post annex up. After has installed the SDK, launch it  in console mode and goes in the folder where you have  the file:  "VCExpress.exe " or other compiler VS, and launch it. Then you follow the set options from the post indicated in this message.

     


    beginner of planning
    Friday, July 30, 2010 10:29 PM
  • I attach to the present the post to set up and launch VC++ 2008 in Windows SDK 2.0.
    Note: how to see written in the post enclosure, speak straight of VC++ 2005. I had tried this procedure with VC++2008 and SDK 2.0 . It worked. But already the SDK 2.0 be old. Now it must you inform of the last SDK version.


    Thursday, December 07, 2006

     

     

     

    C++: Visual C++ 2005 Express Edition x64

    Visual C++ 2005 Express Edition is a free 32 bit IDE and compiler offered by microsoft. It has limitations (no resource editor, no MFC) but you can build command line apps with it ok, and if you set it up properly you can build apps for x64. This is helpful particularly if you have an x64 system, and don't want to pay for Visual Studio 2005 which has support for x64 compilation. To enable x64 install the free Microsoft Platform SDK. Then depending on what you're programming you may want the .NET Framework SDK 2.0 (x64).

    download links

    Visual C++ 2005 Express Edition (x86)
    Microsoft Platform SDK
    .NET Framework SDK (x64)

    After installing these, you need to configure Visual C++ Express to compile with the Platform SDK libraries.
    go to Tools > Options > Projects and Solutions > VC++ Directories and set the following:

    Executable files: C:\Program Files\MS_Platform_SDK\Bin
    Include files: C:\Program Files\MS_Platform_SDK\Include
    Library files: C:\Program Files\MS_Platform_SDK\Lib
    Note: depending on where you installed the platform sdk you may have to use "Microsoft Platform SDK for Windows Server 2003 R2" as "MS_Platform_SDK" above.

    Now, open up the x64 open build debug/retail environment window (came with Platform SDK). It will look like a command-line interface. From that command-line go to the folder where "VCExpress.exe" is located and call it. Now when you build apps it will build with the x64 libraries.

    Then, you need to modify some default settings in your projects.

    To compile for x64, create 'x64' in the configuration manager for x64 (copy settings from win32), then verify and set the following project settings:

    * /MACHINE (Specify Target Platform) is set to /MACHINE:AMD64.
    * Register Output is turned OFF.
    * If Debug Information Format was set to /ZI in the Win32 project configuration, then it is set to /Zi in the 64-bit project configuration. For more information, see /Z7, /Zi, /ZI (Debug Information Format).
    * Values of WIN32 are replaced by WIN64 for /D (Preprocessor Definitions).

    When linking, if you get errors like:
    "error LNK2001: unresolved external symbol _RTC_Shutdown"
    then set "Basic Runtime Checks" to Default in the project settings.

    When linking, if you get errors like:
    fatal error LNK1112: module machine type 'AMD64' conflicts with target machine type 'x64', you need to make sure you use /MACHINE:AMD64 and not /MACHINE:x64. If it won't let you, change to "Not Set", then add it explicitly under Additional Linker Options.

    When running your app you may get an error saying msvcrtd.dll not found. Go to your platform SDK folder, and go to noredist/win64/amd64 and you will find it there, copy it into your system32 folder. Don't use the one in noredist/win64/ like i did at first, it doesn't help.


    http://social.msdn.microsoft.com/Forums/it-IT/netfx64bit/threads

    http://social.msdn.microsoft.com/Forums/it-IT/windowssdk/threads


    beginner of planning
    Friday, July 30, 2010 10:52 PM
  •  

    Hi

    Did you think the idea of Albitex can solve your problem?

     

    Regards!

    Jesse


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, August 02, 2010 3:26 AM
    Moderator
  • Try this:

    Right-click your project in Solution Explorer, select Properties, go to Configuration Properties > General and select Windows7.1SDK in the Platform Toolset property.

    The Windows 7.1 SDK has the annoying "feature" of not being able to set the new SDK as the default, leaving you with 7.0a which doesn't install 64-bit support with Express.  You also have to change this setting for every project you want to build with the new SDK from now on.

    Saturday, August 14, 2010 10:19 AM
  • That worked. The Platform Toolset property needed to be changed to Windows7.1SDK. Thanks!
    Sunday, August 15, 2010 3:24 PM
  • What kind of Visual Studio 2010 (Visual C++)and other ( SDK e.g ) i need in order to works in 64 bit ?

    Your Sincerely .

     

    Rafał Bator

    Poland

     

    Wednesday, August 25, 2010 12:41 PM