ImageVerifierCode 换一换
格式:DOC , 页数:75 ,大小:236.44KB ,
资源ID:7859329      下载积分:10 金币
快捷注册下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/7859329.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

开通VIP折扣优惠下载文档

            查看会员权益                  [ 下载后找不到文档?]

填表反馈(24小时):  下载求助     关注领币    退款申请

开具发票请登录PC端进行申请

   平台协调中心        【在线客服】        免费申请共赢上传

权利声明

1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。

注意事项

本文(CodeWarrior软件与编程的讲解.doc)为本站上传会员【pc****0】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4009-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

CodeWarrior软件与编程的讲解.doc

1、CodeWarrior 使用教程 第一课 认识 CodeWarrior Translated from CodeWarriorU.COM CodeWarrior 能做些什么?     当你知道自己能写更好的程序时,你一定不会再使用别人开发的应用程序。但是常常会发生这种情况,就是当你写了无数行代码后,却找不到使得整个程序出错的那一行代码,导致根本没法编译和链接整个程序。这可能更令人灰心丧气。     本文将告诉你如何使用 CodeWarrior 这一工具解决上述问题。     从现在开始,我们将集中精力学习如何在 CodeWarrior 中使用 C/C++ 进行编程。为了学习本课

2、程,你必须已经能够比较熟练地使用上述两种语言之一。CodeWarrior 也可以支持 Java 开发,但那是另一门课程的内容。本课程仅限于在 Windows 平台上使用 CodeWarrior 进行的开发。一旦你精通了 CodeWarrior 编程后,你可以试试在其它平台上使用 CodeWarrior。本文中讨论过的大部分内容都可以应用到开发 Mac 应用程序中。     CodeWarrior 能够自动地检查代码中的明显错误,它通过一个集成的调试器和编辑器来扫描你的代码,以找到并减少明显的错误,然后编译并链接程序以便计算机能够理解并执行你的程序。你所使用过的每个应用程序都经过了使用象 Co

3、deWorrior 这样的开发工具进行编码、编译、编辑、链接和调试的过程。现在你在我们的指导下,自己也可以去做这些工作了。     你可以使用 CodeWarrior 来编写你能够想象得到的任何一种类型的程序。如果你是一个初学者,你可以选择编写一个应用程序(比如一个可执行程序),比如象微软公司的文本编辑器 WordPad 这样的应用程序。     应用程序可能是最容易编写的程序了,而那些庞大的商业软件,比如象 Adobe Photoshop,Microsoft Word 以及 CodeWarrior 软件都是极其复杂的。其它类型的程序指的是控制面板(control panels),动态链接

4、库(dynamic linked libraries,DLLs) 和插件(plug-ins)。我们先来简单的讨论一下这些类型的程序。     在 Windows 中,控制面板程序是一些(通常比较小的)存放在控制面板目录下的程序,可以在开始菜单的控制面板项中看到它们。控制面板实际上是设置系统功能的一个简单界面,比如可以在控制面板中完成诸如设置音量和鼠标移动速度这样一些参数。     动态链接库 (DLLs) 提供了一些很有用的被系统和应用程序共享的函数。通常它们都是没有用户界面的。     插件 (Plug-ins) 有点类似于 DLLs,插件也是可供其它软件使用的小程序,但插件只能被特定

5、的软件使用。比如说,Photoshop 的插件允许程序员方便地扩展 Photoshop 的功能,而不需要去修改它的源代码。同样的,许多 Web 浏览器也使用插件来增加功能,或者为了让你能够看到页面上的新的内容类型。实际上,有许多程序,包括 CodeWarrior,都使用这种插件结构。     一旦你掌握了 CodeWarior 和你所使用的操作系统的编程接口时,你可以编写许多其它类型的程序。实际上,本课程也是你深入学习其它编程方法的基础课程。你已经找到了一个最优秀的地方开始你的编程之旅。好,现在请坐好,放松,去吸取这门课程的精华吧,你将踏上一条成为一个编程武士的道路! CodeWarrio

6、r 入门     CodeWarrior 是一个复杂的应用程序,你必须花点时间来了解它的各种各样的组件和功能。第一课将讲述CodeWarrior IDE 的安装。我们将学习菜单、窗口和其它的一些方面。建议你最好一边学习本课程,一边学习使用 CodeWarrior 的集成开发环境。我们从运行 CodeWarrior 开始,如果你按照默认方式安装的CodeWarrior 软件,那么在 Windows 的桌面上将会有一个该软件的快捷方式图标。双击该图标启动CodeWarrior 的集成开发环境。如果在 Windows 桌面上没有这个快捷图标(这种情况经常发生),你可以在C:\Program Fil

7、es\Metrowerks\CodeWarrior\Bin 中找到 IDE.exe 文件,然后运行它。 工具条 启动 CodeWarrior 后,你将会看到,在屏幕上方的菜单下面有一个工具条。这个工具条(见图1-1)包含了一些常用菜单项的快捷方式。在后面的章节中,你将学到如何设置这个工具条,甚至是整个 IDE 环境。现在,你应记住,这个工具条用于快捷使用 IDE 中的功能。 图 1-1: CodeWarrior IDE 的工具条 文件菜单     CodeWarrior IDE 的菜单是按照标准方式设置的。其中的文件菜单用于处理和文件相关的一些操作,比如创建、打开、保存和

8、打印等等。 编辑菜单     CodeWarrior 的编辑菜单和其它的 Windows 应用程序也很相像。其中包括了剪切、复制和粘贴等操作,以及其它一些使得程序员能够更方便地管理源码版面布局的选项。在编辑菜单中还有一个 Preferences 项,我们在这一课的后面将提到它。 查看菜单 查看菜单(图1-2)用于安排工具条和其它窗口在 CodeWarrior 环境中如何显示的选项。所谓的“其它窗口”包括许多特殊的窗口,比如观察点(Watchpoints)窗口,表达式(Expressions)窗口,过程(Processes)窗口和全局变量(Global Variables)窗口等。

9、 图 1-2: 查看菜单中的工具条子菜单 查找菜单     查找菜单用于在单个文件或硬盘的目录中查找指定的代码。你可以使用它来方便地替换文本块或在你的代码中搜索指定的项目。即使是在小工程中使用这个工具也非常方便。 工程菜单     工程菜单中的工具用于管理 CodeWarrior 工程。一个工程包括组成你正在编写的程序的所有的文件,包括头文件、源代码和库文件。工程窗口显示了所有这些文件的名称。我们将在第二课中深入讨论这部分内容。 调试菜单     这是在编制程序中最常用到的工具。我们将在第五课中详细介绍它的使用方法。 窗口菜单     用于在 CodeWarri

10、or 环境管理窗口显示方式的菜单。 帮助菜单     通过帮助菜单可以到网上寻求关于 CodeWarrior 任何问题的在线解答。够酷的吧?   了解 CodeWarrior 集成开发环境的设置     CodeWarrior IDE 提供了许多设置以便让你定制你的工作环境。当你选择了编辑菜单中的 Preferences 项时,你将会看到一个设置对话框(如图1-3)。在该对话框中,有控制 CodeWarrior 编辑器、调试器和其它许多功能的界面和行为的选项。在这一节中,我们将学习这些设置的使用。 图 1-3:  设置对话框     你可以在自己的 CodeWarrior 中

11、试试上述这些设置项。你可以先点击问号标志,然后点击你感兴趣的项目,就可以得到一个有关该项目的用途的简短介绍,也可以从帮助菜单中得到更详细的信息。 通用设置 · 编译设置(Build Settings): 选择是否在执行编译之前保存已打开的源文件,以及有多少内存被用于编译工作; · IDE 之外(IDE Extras): 几个独立的设置。比如指定 CodeWarrior 是否使用一个第三方的文本编辑器——因为集成的编辑器并不是很完美,这可以通过指定一个你惯用的编辑器来替代它; · 插件设置(Plug-In Settings): 供插件开发商调试他们的插件; · 隐藏文件夹(Shield

12、ed Folders): 在这里指定的文件夹在工程设计期间,或执行查找和比较操作期间,将要被忽略掉。如果在你的工程级有一个巨大的“数据”文件目录,而你又不想让这些文件降低CodeWarrior 的操作速度时,这个设置就很管用了; · 资料树(Source Trees): 用于指定 CodeWarrior 在编译程序时用不着的目录。 编辑器设置 · 编辑器设置(Editor Settings): 几个用于定制编辑器显示、管理文本和窗口的设置项; · 字体和制表符(Fonts and Tabs): 设置编辑器中的文本大小、字体、制表符和其它显示设置; · 文本颜色(Text Colors

13、): 用于指定特定语言元素(比如程序的注释)在编辑窗口中的显示的颜色。 调试器设置 · 显示设置(Display Settings): 几个用于定制调试器显示的设置项; · 视窗化(Windowing): 设定调试器如何管理它的窗口(比如隐藏所有打开的编辑器窗口); · 全局设置(Global Settings): 几个用于定制调试器在全局层次如何工作的设置。比如当一个包含了程序调试信息的文件被打开时,是否启动这个程序; · 远程连接(Remote Connections): 允许通过 TCP/IP 进行远程调试。这样,你就可以在地球的另一边调试你的软件了; · Java 设置/J

14、ava 调试(Java Settings/Java Debugging): 允许你设置特定的 Java 编程语言选项。本课程不涉及这部分内容。 RAD 工具 · Layout 编辑器: 几个用于在 CodeWarrior 中定制快速应用程序开发工具的使用的设置。     正如你所见到的,CodeWarrior 有许多设置项和选项。设置完后点击“Save”按钮保存你所作的修改,点击“Close”按钮将忽略你所作的所有修改。在进入下一节课之前,多练习几次。最后请确认“默认的文本文件格式(Default Text File Format)”(在编辑器设置面板中)保持为 DOS 设置。 (待续

15、) 附原文: Lesson 1: Getting to Know CodeWarrior   What Will CodeWarrior Do for Me? It can be frustrating to use other people's applications when you know you can make something better. But it can also be frustrating when you have a zillion lines of code and can't find the one typo that's making

16、the whole application go kablooey -- not to mention getting it all compiled and linked and so on. This is why you are here. And this is why CodeWarrior was created. For now, we'll focus on writing programs in CodeWarrior using the C or C++ programming languages. This course assumes that you're pre

17、tty comfortable using at least one of these languages. CodeWarrior also supports Java development, but that will be covered in a separate class. This course concerns itself with Windows platform development. Once you get really good at programming with CodeWarrior, you can explore the other platform

18、s for which tools have been designed. Much of what will be discussed here can also be applied to developing Mac applications. CodeWarrior automatically checks your code for obvious errors, helps you scan it for less obvious ones (via an integrated debugger and editor), and then compiles and links t

19、he code so that your computer can understand and execute your program. Every application that you have used has been through the coding, compiling, editing, linking, and debugging process, using tools like CodeWarrior. Now you can do it too! But we still have to teach you how. Using CodeWarrior, yo

20、u can write just about any type of program you can imagine. If you are a beginner, you may choose to write an application (also known as an executable) as your first program. You might choose to create something as basic as WordPad, Microsoft's text editor, for example. Applications are probably th

21、e simplest type of program to write, though large commercial ones like Adobe Photoshop, Microsoft Word and even CodeWarrior itself are quite complex. Other program types include control panels, dynamic linked libraries (DLLs), and plug-ins. Let's talk about these types for a minute. Under Windows,

22、control panels are those (usually small) programs that are stored in your Control Panels directory and visible in the Control Panel section on the Start menu. The control panel itself is simply an interface to a system-wide feature, like setting the sound volume or the mouse's motion speed, for exam

23、ple. DLLs supply useful functions that are shared by the operating system and applications. They typically don't have a user interface Plug-ins are similar to DLLs in that they provide small pieces of code that are used by other software. However, a single program typically uses this code. For exa

24、mple, Photoshop plug-ins allow programmers to easily extend the capabilities of the Photoshop application without having access to its source code. Likewise, many Web browsers use plug-ins that add extra features to the application or allow you to manipulate new content types on the Web. Many progra

25、ms, including CodeWarrior, make use of this plug-in architecture. There are plenty of other types of programs you can write once you master CodeWarrior and the programming interfaces for your operating system. In fact, once you complete this course, you can take other courses in which you will lear

26、n more in-depth methods of programming your computer. You've chosen an excellent place to begin your journey, however. So sit back, relax, and absorb the lessons in this course, and you'll be well on your way to becoming a CodeWarrior!   An Introduction to the CodeWarrior Application CodeWarrior

27、is a complex application. If you really want to benefit from all of its features, you should take this time to get to know its various components and the capabilities that will be available to you. This first lesson will give you a basic overview of how the CodeWarrior IDE is set up. (That acronym g

28、ets thrown around a lot, and it's short for Integrated Development Environment. ) We'll take a look at menus, windows, and other aspects of the program. Follow along with the CodeWarrior IDE while you read through these lessons. Start by launching the IDE application. If you followed the defaults fo

29、r the CodeWarrior software installation, there will be an icon that represents a shortcut to the program. Double-click on it to start the IDE. If the shortcut icon is absent (these things happen), you can typically find the program at C:\Program Files\Metrowerks\CodeWarrior\Bin\IDE.exe. Toolbar Wh

30、en you launch the CodeWarrior IDE, you'll notice a toolbar attached to the menu at the top of your screen. This toolbar (Figure 1-1) contains buttons that are shortcuts to frequently used menu items. You'll learn how to customize this toolbar -- and even the entire IDE -- in a later lesson. For now,

31、 notice that this toolbar can be used to quickly access features within the IDE. Figure 1-1: The CodeWarrior IDE toolbar. File Menu The menus in the CodeWarrior IDE are set up in a relatively standard manner. The File menu contains choices that manage the care and feeding of files. It has stand

32、ard items that let you create, open, save, and print files. Edit Menu The Edit menu will also seem familiar if you use other Windows applications. You'll find commands that cut, copy, and paste text, as well as a few other options to help programmers more easily manage source code layout. There is

33、 also a Preferences item in the Edit menu that we'll discuss later in this lesson. View Menu The View menu (Figure 1-2) gives you options to manage which toolbars and other windows are displayed in the CodeWarrior environment. Some of these windows include various specialty windows, such as the Wa

34、tchpoints window, Expressions window, Processes window, and Global Variables window. Figure 1-2: The Toolbar submenu of the View Menu. Search Menu The Search menu's commands allow you to locate source code within a single file, or within the directories of your hard disk. You can also easily re

35、place large blocks of text or search your source code for references to other source code. These tools can be very handy, even for small projects. Project Menu Tools in the Project menu allow you to manage CodeWarrior projects. A project includes all of the files that make up a program you are wri

36、ting, including its headers, source code, and libraries. The Project window serves as a container for these files. We'll discuss this in more depth in Lesson 2. Debug Menu When your source code doesn't do exactly what you want it to (or your computer crashes when you run your program), you'll deve

37、lop a close relationship with the items on the Debug menu. We'll discuss debugging in Lesson 5. Window Menu The Window menu gives you the basic options to manage cascading and tiling windows in the CodeWarrior environment. Help Menu Lastly, use the Help menu to get online help with just about an

38、y item in CodeWarrior. Pretty cool setup, huh?   Getting to Know IDE Preferences The CodeWarrior IDE has numerous preferences that you can use to customize your work environment. You may only want to change the text color, or you might want to get more personal, changing lots of settings. When yo

39、u select Preferences from the Edit menu, you are presented with the IDE Preferences dialog box (Figure 1-3). There, you'll find options that control the appearance and behavior of the CodeWarrior editor, debugger, and lots more. In this section, we'll take a look at these preferences. Figure 1-3:

40、 The Preferences dialog box. As each item is described below, follow along in your own copy of CodeWarrior, and check out the various options available. You can get additional help by clicking on the question mark, then the item you're interested in. You'll see a terse description of the selected i

41、tem's purpose. More detailed information is also available from the Help menu. The General Preferences · Build Settings: Choose whether to save open-source code files before performing a build and how much memory to use while building. · IDE Extras: Various settings that don't belong anywhere els

42、e. Here's where you can have CodeWarrior interoperate with a third-party text editor. The integration of editors with the IDE is often less than perfect, but this limitation may be offset by the ability to use an editor that you know and like. · Plug-In Settings: Used by plug-in developers to assis

43、t in the debugging of plug-ins. · Shielded Folders: Directories listed here are skipped (ignored) during project and/or find and compare operations. This can be useful if you have a large directory of "data" files inside your project hierarchy yet you do not want those files to slow down certain op

44、erations of CodeWarrior. · Source Trees: This lets you specify directories other than the standard ones CodeWarrior searches when it builds a program. Editor Preferences · Editor Settings: Various settings to customize the way the Editor displays and manages text and windows. · Fonts and Tabs: T

45、ext size, font, tab, and other display settings for the Editor windows. · Text Colors: Like the browser display, you choose the color in which certain language elements (such as comments) appear in the Editor window. Debugger Preferences · Display Settings: Various settings to customize the displ

46、ay of the debugger. · Windowing: How the debugger manages its windows (e.g., hiding any open editor windows). · Global Settings: Various settings that customize how the debugger works on a global level, such as whether to launch a program when you open a file that contains the program's debugging

47、information. · Remote Connections: Allows debugging over TCP/IP. You can debug software on a computer on the other side of the Earth! · Java Settings/Java Debugging: Allows you to set specific java programming language options, not covered in this course. RAD Tools · Layout Editor: Various setti

48、ngs to customize the use of rapid application development tools within CodeWarrior. As you can see, there are numerous settings and options that can be set. Clicking the Save button will save any changes you've made. Clicking the Close box for the Preferences window will cause CodeWarrior to ignore

49、 any changes you've made. Go ahead and play with it a little before you proceed to the next lesson. Make sure the Default Text File Format (in the Editor Settings panel) remains set for DOS.      第二课  显示和定制工程和目标文件(1) Translated from CodeWarriorU.COM     本课将讲述 CodeWarrior 操作文件的方式以及介绍它的工程(Proje

50、ct)窗口。 什么是工程文件     为了使用 CodeWarrior 来创建一个应用程序,你必须创建许多文件来构成一个工程(Project)。该工程的设置和所有这些文件的指针都被存放在一个工程文件中。这些设置包括编译和链接设置、源文件、库文件以及它们之间用于产生最终程序的相互关系。你可以将这个工程文件看作该工程的大脑:它保存了所有文件相互依存的关系并知道如何将它们组合成为一个可用的应用程序。工程窗口依次显示了这些关于你的程序和该程序所包含的文件的信息,并允许你只需轻松点击就可以修改这个工程。图2-1显示了工程窗口的外观。 图 2-1: 显示工程信息的工程窗口(图示为空的情况)  

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服