Port Visual C++ Applications Between Intel-Based and RISC Platforms (Alpha or PowerPC)

Visual C++ for Alpha and PowerPC is designed to be portable between both RISC platforms and Intel platforms. MFC is designed to make C++ code universal on all these platforms, and applications should port easily.

If you have the RISC cross-development package installed, you can convert Intel-based projects to RISC-based projects and vice versa automatically. You can also open any project in the development environment on any platform and change the build settings, but you cannot build a project created on one platform in the development environment on another platform without converting it first.

  • Convert Visual C++ RISC projects in Intel-based Visual C++

  • Convert Intel-based Visual C++ projects in RISC Visual C++

  • RISC Bit Alignment

Convert Visual C++ RISC Projects in Intel-Based Visual C++

To convert RISC projects to Intel-based projects

  1. On your Intel-based computer, click Open Workspace from the File menu.

    The Open Project Workspace dialog box opens.

  2. Select your RISC project and click Open.

  3. From the Build menu, click Configurations.

    The Configurations dialog box appears. Notice that the RISC configuration projects are listed, but are unavailable.

  4. Click Add.

    The Add Project Configuration dialog box appears.

    This will be the name of your Intel version of the project.

  5. In the Platforms drop-down list, select Win32.

  6. Give a name for the new configuration in the Configuration edit box, such as Debug(x86).

  7. Click OK.

    An Intel-based project with the same build settings as your RISC-based project is automatically created.

Convert Intel-Based Visual C++ Projects in RISC Visual C++

To convert Intel-based projects to RISC projects

  1. On your RISC computer, click Open Workspace from the File menu.

    The Open Project Workspace dialog box opens.

  2. Select your Intel project and click Open.

  3. From the Build menu, click Configurations.

    The Configurations dialog box appears. Notice that the Intel-based configuration projects are listed, but are unavailable.

  4. Click Add.

    The Add Project Configuration dialog box appears.

  5. In the Platforms drop-down list, select your RISC platform (Alpha or PowerPC). Only those platforms for which you have a cross-development package appear in the Platforms list.

  6. Give a name for the new configuration in the Configuration edit box, such as Debug(x86).

  7. Click OK.

    A RISC-based project with the same build settings as your Intel-based project is automatically created.

RISC Bit Alignment

RISC platforms expect data to be laid out in 32-bit parcels. If you try to extract data from the middle of a 32-bit parcel, you get an alignment fault. Handle this by:

  1. Making sure all data lines up on 32-bit addresses.

  2. Adding the keyword UNALIGNED in front of pointers.

See Knowledge Base article Q92762. (Connect to https://www.microsoft.com/kb/ to access Knowledge Base articles. Choose Visual C++ in the Choose a Microsoft product or technology drop-down list. Enter the article number in the Enter a Search Phrase text box, then click Begin Search.)