Metrowerks Professional Edition v6 Integrated Development Environment Installation Guide
PDF
Dokument
Reklamë
Reklamë
7 AF a
BASIC SYSTEM REQUIREMENTS"
Hardware PC with Pentium-class or AMD-K6™ processor
64 MB of RAM
CD-ROM drive
Software Microsoft Windows 95/98/2000
or Windows NT® 4.0 with Service Pack 3 or later operating system
Disk Space approximately 150 MB free hard disk space for a minimum installation
approximately 450MB for a full install
*Some target system requirements may vary. Consult the Targeting manual for specifics.
Installing CodeWarrior for Windows® Using C
Follow these steps to successfully install CodeWarrior for Windows:
1.
Install the CodeWarrior tools.
Insert the CodeWarrior Tools CD. On a typical system the installation starts automati-
cally. If Auto Install is disabled, run the program Setup.exe.
Follow the installation instructions on your screen.
Register CodeWarrior.
At the end of the installation, you have the opportunity to register now or later. To
complete the registration, enter the requested information.
To register at a later time, click the Start button and select CodeWarrior Registration
from the CodeWarrior, Professional Edition, v6 group. This runs the MWRegister.exe
program.
Once you click the Register button, you can choose to email your registration infor-
mation, or print the information so you can mail or fax it to Metrowerks.
Note: You must restart your computer once the CodeWarrior software is installed.
Coding a Windows Console Application Using C
Follow the steps below to create a simple console application.
1.
Launch the CodeWarrior IDE.
Click the Start button and select CodeWarrior IDE from the CodeWarrior, Professional
Edition, v6 group. This runs the program !DE.exe.
Create a project using CodeWarrior stationery.
Choose the File > New menu item. The New window appears with a list of options in
the Project tab.
a. Enter information in the Project pane.
Since we want to create a CG console application, select “Win32 C Stationery”
from the Project pane on the left side of the window.
In the Project name edit field, type a project name and add the “ mcp” exten-
sion (for example, “test.mcp”). This extension associates the project with the
CodeWarrior IDE as a CodeWarrior project. It is the standard extension used by
Metrowerks for CodeWarrior project files.
Finally, specify a location for
the project. To specify the fold-
er where the project file should
be saved, click Set and use the
standard file dialog to save
your project.
a Java fpphet Wizard [test mep
ll Java Apphcation wizard
Java Baan Wizard
o Local
Java Stationer Fa
SB Make motes Wizard Е Мея! Se]
The New window should look
I 2dd to Розе:
Project
pa
similar to the one at right. Click
OK to continue. | Lo | ca |
if in32 C++ Stalioneny
MB in32 MEE Stationesy
b. Selecta project stationery in the New Project window.
Expand the “Win32 Console App” list control
and choose the “C Console App” project sta- [CT
, Select peojeci stationeey:
tionery. Project Staonery —
edo Coma?
The New Project window should look similar to C Console App Kb
Win
the one at right. Click OK to continue. Win GUN App
эс wind? WnSIOLU App
The CodeWarrior IDE creates a project with all „|
the required libraries and the project window —* | cama |
appears.
Remove the placeholder source file from the project.
A placeholder source file, main.c, exists in the new project. We want to remove this
file because it's not needed in this tutorial.
To remove the file from the project, click the list control next to the Source group
(the + sign), click the fite main.c in the Project window, choose Edit > Delete and
click OK in the next dialog box.
4. Create a blank text file.
Press Ctrl-N to create a blank text file {or click the document icon in the toolbar,
which is the left-most icon in the toolbar). An untitled, empty editor window appears.
5. Enter the example code.
Enter the following source code in the editor window:
/* A minimal Win32 console application */
tinclude <stdio.h>
int main( void )
{
printf (“Hello Metrowerksi\n”);
return 0;
}
6. Save the source file.
To save your source file, press Ctrl-S (or choose File > Save). When the Save docu-
ment as dialog box appears, name the source file Hello.c and click Save. The .c
extension enables the CodeWarrior IDE to recognize this file as a source code file.
7. Add the file to your project.
With the editor window frontmost, choose Project > Add Hello.c to Project.
The Add Files window appears. Use this window to specify which build targets
should use the Hello.c file. If you want to add the file to all targets (in this example,
we do), click OK.
The file Hello.c is added to alt build targets in the project window.
Note: The IDE uses groups to organize your code. To move your new source file,
click the file Hello.c and drag it on the Sources group in the Project Window. If you
moved the source file, it's now located in the Sources group.
8. Compile, link, and run the example. … Process lerminated. Press any key to close window. aC |
['- | PE 1
Choose Project > Run.
The console project is compiled, linked,
and run (Hypertextparanum}.
Congratulations! You just created a simple
console program using the CodeWarrior IDE on Windows.
">
/
Shkarko
Vetëm një kujtesë miqësore. Ju mund ta shikoni dokumentin këtu. Por më e rëndësishmja, AI ynë tashmë e ka lexuar atë. Ai mund të shpjegojë gjëra komplekse në terma të thjeshtë, t''u përgjigjet pyetjeve tuaja në çdo gjuhë dhe t''ju ndihmojë të lundroni shpejt edhe në dokumentet më të gjata ose më të komplikuara.
Reklamë