Targeting Windows

1 Introduction

Read the Release Notes!
What's New in This Release
The CodeWarrior IDE and Its Documentation
What's in This Manual
Where to Go from Here

2 Getting Started

System Requirements
Installing CodeWarrior for Win32/x86
CodeWarrior Compiler Architecture
Development Tools for Win32/x86
CodeWarrior IDE
CodeWarrior Debugging for Win32/x86
CodeWarrior C/C++ Compiler for Win32/x86
Resource Compiler for Win32
CodeWarrior Linker for Win32/x86
Metrowerks Standard Libraries
Win32 API Headers
MFC Application Framework
Microsoft Compatibility
The CodeWarrior IDE Development Process

3 CodeWarrior for Win32: A Tutorial

Tutorial: Meet Ray the Tracer
Phase 1: Creating a Project
A Look at the Code
Phase 2: Getting Resourceful
Phase 3: Handling Commands
Phase 4: What, Pray Tell, Is a DLL?
Phase 5: All Together Now

4 Creating Win32/x86 Applications

What is an Application?
Creating an Application
Choosing Libraries for Applications
C/C++ Libraries
Win32 SDK Libraries
MFC Libraries

5 Creating Static Libraries for Win32/x86

About Static Libraries
Creating a Static Library

6 Creating Win32/x86 Dynamic Link Libraries

About Dynamic Link Libraries
A Primer on Exported Names
Exporting Names
Importing Names
Name Transformations
DLL Initialization
Creating a Dynamic Link Library
Choosing Libraries for a DLL Project
C/C++ Libraries
Win32 SDK Libraries
MFC Libraries

7 Creating Win32 Resources

Including Resource Files in a Project
Win32 Resource Compiler

8 Target Settings for Win32/x86

Target Settings Overview
Settings Panels for Win32/x86
Target Settings
x86 Target
x86 Processor
Windows RC
x86 Linker
x86 Disassembler
Runtime Settings
Debugger Settings
x86 Exceptions

9 C and C++ for Win32

Number Formats for Win32/x86
Win32/x86 Integer Formats
Win32/x86 Floating-Point Formats
Calling Conventions for Win32/x86
Variable Allocation for Win32/x86
Register Variables for Win32/x86
Optimizing Code for Win32/x86
Register Coloring
Instruction Scheduling
Alias Analysis
Linker Issues for Win32/x86
Deadstripping Unused Code and Data
Link Order
Pragmas for Win32/x86

10 Assembly Code Support

Working With Assembly Code for Win32/x86
Assembler Syntax
Supported Directives in Assembly
Creating Labels for Win32/x86 Assembly
Using Comments in Win32/x86 Assembly
Using the Preprocessor in Win32/x86 Assembly
Using Local Variables and Arguments in Win32/x86 Assembly
Local Variables in MMX Registers
Inlining Functions Containing Assembly
Inline Assembly and Optimization
Intrinsic Operations
Working with Assembly Code for AMD Processors

11 Debugging for Win32/x86

Project Settings for Debugging
Debugging an Application
Debugging a Static Library
Debugging a DLL
Debugger Preference Panels
Runtime Settings
Setting Up for Remote Debugging
Networking the Computers
Configuring the Network Software
Debugging AMD-Specific Code

12 Libraries and Runtime Code for Win32/x86

Standard Libraries for Win32/x86 Overview
The Metrowerks Standard Libraries
File and Memory Restrictions
Exception Handling in MSL C++
Libraries for Win32 Development
The Microsoft Foundation Classes
Non-Standard MSL C Functions for Win32

13 Targeting AMD Processors

Targeting AMD Processors Overview
Optimizations
Calling Conventions
Minimizing Mode Switching
Vectorization
Loop Distribution
Alias Analysis
Handling Reduction Functions
Pragma Support
Code Generation Pragmas
Constant Definition Pragmas
Library Considerations
Name Mangling
Required IDE Settings
Using Assembly Code with AMD Processors
Athlon 3DNow! Instructions
Athlon MMX Inline Instructions

14 Batch File Plug-in

Add batch files to your project
Enable the batch file post-linker

15 Troubleshooting

Troubleshooting Overview
Win32 Programming Problems
Errors With min() and max()
Compiling a Project for Mac OS on Windows NT
Link Error: Undefined symbol: _WinMainCRTStartup
Throwing and catching unnamed exceptions
Cannot add files to a project
Printing output from Windows Java applications
Clear screen in WinSIOUX
Removing object code from sub-projects

16 x86 Command-Line Settings

x86 Language Options
Preprocessing and Precompiling
Language Control
Warning Options
x86 Compiler Options
x86 Linker Options
Win32 x86 Linker
x86 Compiler Debugging Options
x86 Linker Debugger Options
x86 Assembler Debugger Options

Index



Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: July 21, 2000