Microsoft KB Archive/123181

{| The information in this article applies to:
 * width="100%"|
 * Microsoft Visual C++ Cross-Development Edition for Macintosh, version 2.0

SUMMARY
This article contains answers to some of the most frequently asked questions regarding Visual C++ for Macintosh.

NOTE: The Macintosh is manufactured by Apple Computer, Inc., a vendor independent of Microsoft; we make no warranty, implied or otherwise, regarding the performance or reliability of the Macintosh.

Index to Questions
 What is the Visual C++ Cross-Development Edition for Macintosh? What are the system requirements? Is this product part of the Visual C++ version 2.0 for Windows product? Does the Cross-Development Edition have the same features as Visual C++ version 2.0 for Windows? Is there a Macintosh version of Microsoft Foundation Classes (MFC)? Which Macintosh hardware platforms can I target with the Visual C++ Cross-Development Edition? What's the extent of support for Macintosh OLE 2 application development? Does the Visual C++ Cross-Platform Edition include ODBC support?</li> What do I need to do to my Windows source code before I can port it using this product?</li>  Are there any tools in Visual C++ to help me port my Windows-based application to the Macintosh? </li> What's new in the development environment for Macintosh developers?</li>  What's different in the build tools from the Visual C++ 2.0 for Windows product? </li>  How does the generated executable size and performance compare with native Macintosh development tools? </li>  What hardware is supported for communicating between a computer using the Microsoft Windows NT operating system and a Macintosh? </li> How do the Windows Portability Libraries work?</li> Which Win32 APIs are not supported?</li> How is the performance of the portability library?</li>  How much platform-specific code must a developer write? Where is this code written? </li></ol>

MORE INFORMATION

 * 1) What is the Visual C++ Cross-Development Edition for Macintosh?

Windows-based application developers use the Visual C++ Cross-Development Edition for Macintosh to leverage their existing source code and tools expertise when porting applications from the Windows operating system to the Macintosh. This Macintosh edition of Visual C++ is an add-on to Visual C++ version 2.0 running on Intel platforms. It contains all the tools you need to build high-performance, native Macintosh-based applications. In addition, the toolset includes the Windows Portability Libraries, an implementation of the Win32 API and architecture on System 7.x. This static linked library enables a single set of source code, written to either MFC or directly to the Win32 API, to target both Windows and the Macintosh. The ported application has the familiar Macintosh user interface.


 * 1) What are the system requirements?

The Macintosh edition hosts on Windows NT Workstation version 3.5. It requires that Visual C++ version 2.0 be running on an IBM PC compatible computer. For the minimum installation, you'll need 80 megabytes of free disk space and at least 16 megabytes of RAM. The product is a remote host/target environment that requires an ethernet or serial connection to the target Macintosh for file transfer and debugging.


 * 1) Is this product part of the Visual C++ version 2.0 for Windows product?

The Visual C++ Cross-Development Edition is sold as an add-on to Visual C++ version 2.0. The add-on extends the Visual C++ environment to include additional menu items, dialogs, and tools that you need to build and debug Macintosh executables from a host machine running Windows NT. By using this product, you can use all the powerful features of Visual C++ version 2.0 to create Macintosh applications.


 * 1) Does the Cross-Development Edition have the same features as Visual C++ version 2.0 for Windows?

Using this product, you (a developer targeting the Macintosh) work in an extended version of the Visual C++ version 2.0 development environment. You can use all the powerful Visual C++ version 2.0 features for Windows development including the IDE, Wizards, MFC version 3.0, and the integrated debugger. The only two exceptions are Just In Time debugging, which requires Windows NT structured exception handling, and incremental linking.


 * 1) Is there a Macintosh version of MFC?

The Visual C++ Cross-Development Edition includes a Macintosh version of the Microsoft Foundation Classes (MFC) version 3.0. Programming to MFC is the way to achieve the maximum percentage of common code between the Windows and Macintosh versions of an application.


 * 1) Which Macintosh hardware platforms can I target with the Visual C++ Cross-Development Edition?

Of the current Macintosh hardware platforms, Visual C++ targets 68020 or higher systems running System 7.0 and above.


 * 1) What's the extent of support for Macintosh OLE application development?

The Windows Portability Library, which ports Win32 API code to the Macintosh, does not currently provide wrapper functions for the Macintosh implementation of Microsoft OLE. However, Macintosh-specific code can be included in an application to use OLE on the Macintosh.

For more information about Microsoft's native Macintosh OLE implementation, please see the documentation included with the Microsoft OLE version 2.01 Software Development Kit (SDK) for the Macintosh.


 * 1) Does the Visual C++ Cross-Platform Edition include ODBC support?

The Windows Portability Library does not provide wrapper functions for the Apple implementation of ODBC, level 1 on the Macintosh, although Macintosh- specific calls to these functions can be included in an application. For information about Apple ODBC support, please see the Apple Computer documentation.


 * 1) What do I need to do to my Windows source code before I can port it using this product?

The first step in preparing to use this product is to move your sources to the Win32 API. The Macintosh is a 32-bit platform, so the portability libraries are based on the Win32 API. Programming to Win32 enables multi-platform targeting of Windows version 3.1 (through Win32s), Windows NT, Windows 95, and now System 7.x.

Are there any tools in Visual C++ to help me port my Windows-based application to the Macintosh? A porting tool, provided as a sample application, identifies non-portable and implementation-dependent APIs in your source code. Run the tool from within Visual C++. With it, you can specify and scan for different types of portability issues. When it identifies an offending line of code, it highlights the non-portable code; you can press F1 to get detailed help from the online portability reference.


 * 1) What's new in the development environment for Macintosh developers?

The IDE for the Visual C++ Cross Development Edition is the same as its Windows counterpart with several new features tailored to Macintosh targeting. These features are a superset of the functionality available in the core IDE. The project management facilities are extended for the new target type, Macintosh Application. The project property pages have new options for setting the build rules for Macintosh targets. The debugger has been enhanced to display 68K machine state information, register contents, and disassembler.

What's different in the build tools from the Visual C++ version 2.0 for Windows product? The Visual C++ Cross Development Edition for Macintosh adds Macintosh targeting build tools to your existing Visual C++ version 2.0 installation. These tools support the same C/C++ language interpretation as the Windows product. This ensures source code compatibility across platforms.

How does the generated executable size and performance compare with native Macintosh development tools? The Visual C++ Cross Development Edition for Macintosh leverages the same optimizing technology used in Visual C++ version 2.0 for Windows to produce the smallest and fastest applications for the Macintosh.

What hardware is supported for communicating between a computer using the Microsoft Windows NT operating system and a Macintosh? Developing, editing, building, and debugging all occurs on the computer running Windows NT, not on the Macintosh. There are two Macintosh-hosted components that support communication with the computer running Windows NT:


 * Visual C++ Debug Monitor, the remote portion of the debugger responsible for communicating with the integrated debugger in Visual C++.
 * Visual C++ File Utility, a general copy program for transferring files between the two computers.

The optimum configuration is an Ethernet connection between the two computers. On the Windows NT side, use any supported Ethernet card, and on the Macintosh side, use an on-board Ethernet or Asante card. Ethernet communication requires Windows NT version 3.5 as it includes the AppleTalk stack. Serial communication at 56K baud is also provided as an alternative. Windows NT versions 3.1 and 3.5 and Windows 95 support serial. No cabling is provided with the product.
 * 1) How do the Windows Portability Libraries work?

The Windows Portability Libraries (WPL) enable applications written to the Win32 API to share a common code base between their Macintosh and Windows versions. These static linked libraries use the Win32 API as the portability API for targeting the Macintosh platform. The resulting application has the familiar Macintosh user interface. In cases where the Win32 and System 7.x APIs are similar, the libraries provide a direct translation (TextOut to DrawText). In other cases, the libraries are an implementation of Windows functionality on the Macintosh (Child Windows).


 * 1) Which Win32 API functions are not supported?

The libraries support the Win32 features for which there are Macintosh analogs including window creation and management, message processing, mouse and keyboard events, and controls such as list and combo boxes. There is no current support for multi-media, COMM (direct serial port access), or console APIs.


 * 1) How is the performance of the portability library?

The C/C++ optimizing compiler for the 680x0 uses the same technology as the Visual C++ version 2.0 Intel compiler for creating high performance executables. The portability layer is designed to perform at 95% of native and is roughly 450K in size. The toolset also includes a profiler that can be used to identify performance critical sections of code.

How much platform-specific code must a developer write? Where is this code written? This depends largely on your application. To take advantage of specific Macintosh or Windows-only features (like Publish and Subscribe on the Mac or multiple printers on Windows), you'll have to write edge code. Other applications may not find it necessary to write any platform-specific code at all.
 * }

-

Last reviewed: October 6, 1997

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.