PTC MKS Toolkit
UNIX to Windows Porting Guide


PTC Inc.
12701 Fair Lakes Circle
Suite 350
Fairfax VA 22033-3831 USA
Office: +1-703-803-3343
Support: +1-703-803-7660
Fax: +1 703 803-3344
http://www.mkssoftware.com/

September 2014

Introduction

Thank you for purchasing PTC MKS Toolkit for Professional Developers or PTC MKS Toolkit for Enterprise Developers. These products contain the tools and libraries to aid you in developing cross-platform solutions using the PTC NuTCRACKER Platform, PTC's award-winning UNIX® compatibility environment on Windows®.

PTC MKS Toolkit for Professional Developers lets you develop, port, migrate and deploy non-graphical UNIX-based applications and scripts.

PTC MKS Toolkit for Enterprise Developers adds support for Motif, X Windows, 3-D, and Open GL giving you a complete solution for cross-platform development, deployment, interoperability, and migration of both graphical and non-graphical UNIX applications and scripts.

While most of the information in this guide applies to both PTC MKS Toolkit for Professional Developers and PTC MKS Toolkit for Enterprise Developers, information on X Windows and other graphics-related packages applies only to PTC MKS Toolkit for Enterprise Developers. The following is an overview of the topics covered:

  • “Windows Concepts” on page 3 discusses differences between the Windows and UNIX platforms.
  • “The Porting Process” on page 29 outlines the process of porting a UNIX application to the PTC NuTCRACKER Platform.
  • “API-Specific Porting Issues” on page 51 discusses some of the issues surrounding individual functions in the PTC MKS Toolkit UNIX APIs. In particular, differences from the equivalent UNIX APIs are covered.
  • “Language Support” on page 73 discusses the different programming languages you can use to develop PTC NuTCRACKER Platform applications.
  • “Using the Visual C++ IDE” on page 79 covers using the Microsoft Visual C++ Integrated Development Environment to develop PTC NuTCRACKER Platform applications.
  • “Porting X Applications” on page 87, “Porting Shared Libraries” on page 93, “Porting Threaded Applications” on page 105, “Porting Daemons” on page 117, discuss how to port or develop X Windows applications, shared libraries (DLLs), programs using threads, and daemons using the PTC NuTCRACKER Platform.
  • “Porting Applications to 64-bit Windows” on page 123 discusses how to use the PTC NuTCRACKER Platform to port applications to the 64-bit Windows platform.
  • “Deploying Applications” on page 133 describes the steps needed to distribute and deploy your PTC NuTCRACKER Platform applications.
  • “Evolving Applications with COM” on page 157 provides details integrating your PTC NuTCRACKER Platform applications more tightly with Windows.
  • “Environment Variables” on page 147, “Console Escape Sequences” on page 153, and “The Communications Port Interface” on page 163 provide additional reference material that you may find useful.



A Note About Compilers

Throughout this manual, there are many references to compiler and linker options. These options are intended for use with the cc and ld utilities in conjunction with the Microsoft Visual Studio C/C++ compiler. If you are using the GCC compiler provided on the PTC MKS Toolkit Resource Kit CD, see the GCC Release Notes also included on the Resource Kit CD for differences between the behavior described in this manual and GCC’s behavior.



A Note About Development Experience

Who should port your application from UNIX to Windows? A Windows developer or a UNIX developer? PTC has found that the best experiance match for the initial port comes from strong UNIX developers. Treat the PTC NuTCRACKER Platform port as just another UNIX port - at least initially.