如何下载和安装Open Watcom C / C ++编译器

本文提供了详细的步骤来下载和安装Open Watcom C/C++编译器,适合IBM PC兼容机,80386以上处理器,8MB内存及CD-ROM驱动器。下载最新版本的编译器,双击执行安装,然后重新启动以设置环境变量。安装完成后,通过Windows程序菜单打开IDE,加载并编译示例应用,如生命游戏,以熟悉IDE的使用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

下载Watcom C / C ++编译器 ( Download the Watcom C/C++ Compiler )

Watcom has been around a long time. I wrote applications with it in 1995, so the hardware/software requirements (listed below) to use it should not prove difficult.

Watcom已经存在了很长时间。 我在1995年用它编写了应用程序,因此使用它的硬件/软件要求(下面列出)应该不会很困难。

  1. IBM PC compatible

    兼容IBM PC
  2. An 80386 or higher processor

    80386或更高版本的处理器
  3. 8 MB of memory

    8 MB内存
  4. Hard disk with enough space available to install the components you require.

    硬盘具有足够的可用空间来安装所需的组件。
  5. A CD-ROM disk drive

    CD-ROM磁盘驱动器

下载Watcom ( Download Watcom )

The download page is on this page. Note this is an Open Source system and if you wish to donate anything to pay for hosting, development etc, it is possible to do so here. However, it is optional.

下载页面在此页面上。 请注意,这是一个开源系统,如果您希望捐赠任何东西来托管,开发等,则可以在此处进行。 但是,它是可选的。

The download page holds multiple files with a date and size but no easy way to guess which you require. The file we need is open-Watcom-c-win32-X.Y.exe where X is 1, possibly 2 or higher and Y is anything from 1 to 9. At the time of preparation, the current version was 1.5 dated April 26, 2006, and is 60MB in size. Newer versions may appear. Look down the list until you see F77 (Fortran 77 ) files. The file you want should be the one before the first F77 file.

下载页面包含具有日期和大小的多个文件,但是没有简单的方法来猜测您需要哪个文件。 我们需要的文件是open-Watcom-c-win32-XYexe,其中X为1,可能为2或更高,Y为1到9。在准备本文时,当前版本为2006年4月26日的1.5,并且大小为60MB。 可能会出现较新的版本。 查看列表,直到看到F77(Fortran 77)文件。 您想要的文件应该是第一个F77文件之前的文件。

[ ] open-watcom-c-win32-..> 07-Apr-2006 03:47 59.2M
[ ] open-watcom-c-win32-..> 13-Apr-2006 02:19 59.2M
[ ] open-watcom-c-win32-..> 21-Apr-2006 02:01 59.3M
[ ] open-watcom-c-win32-..> 26-Apr-2006 19:47 59.3M <--- This one
[ ] open-watcom-f77-os2-..> 18-Nov-2005 22:28 42.7M

There is a documentation website for this product in the form of a Wiki at here.

在此处有此产品的文档网站,形式为Wiki

如何安装Open Watcom C / C ++开发系统 ( How to Install the Open Watcom C/C++ Development System )

Double Click the executable and you will be presented with a list of options. There is no need to change any - press next twice and the compiler will install.

双击可执行文件,您将看到一个选项列表。 无需更改任何内容-按下两次,编译器将安装。

After installation, it will ask about modifying environment variables and the default selected middle option (Modify local machine environment variables) should be selected. Click the Ok button.

安装后,它将询问有关修改环境变量的信息,并且应选择默认的选定中间选项(“修改本地计算机环境变量”)。 单击确定按钮。

You will need to reboot so the environment variables are correctly set.

您将需要重新启动,以便正确设置环境变量。

At this point the Installation is complete.

至此,安装完成。

打开Watcom IDE ( Open the Watcom IDE )

The Open Watcom IDE

Once you've installed Open Watcom (OW), you should see Open Watcom C-C++ on the Windows Program Menu. Click the Start button then move the cursor over Programs, The Open Watcom entry has a sub-menu and you want the fifth menu item, which is IDE. When you click this, the Open Watcom Integrated Development Environment (IDE) will open within a second or two.

安装Open Watcom(OW)之后,您应该在Windows程序菜单上看到Open Watcom C-C ++ 。 单击开始按钮,然后将光标移到程序上,Open Watcom条目具有一个子菜单,您需要第五个菜单项,即IDE 。 当您单击此按钮时,Open Watcom集成开发环境(IDE)将在一两秒钟内打开。

Watcom IDE ( The Watcom IDE )

This is the heart of all development using OW. It contains project information and lets you compile and run applications. It is a bit dated looking and not a slick modern IDE like Visual C++ Express Edition, but it is an excellent and well-tested compiler and debugger and is ideal for learning C.

这是使用OW进行所有开发的核心。 它包含项目信息,并允许您编译和运行应用程序。 它看起来有些过时,而不是像Visual C ++ Express Edition这样的光滑现代IDE,但它是出色且经过充分测试的编译器调试器 ,是学习C语言的理想选择。

打开示例应用程序 ( Open a Sample Application )

Open Watcom IDE Log after Compilation

With the IDE open, click the File menu and then Open Project. Alternatively, you can click Ctrl + O. Browse to the Watcom installation folder (the default was C:\Watcom then Samples\Win and open the mswin.wpj file. You should see about 30 C projects that you can open.

在IDE打开的情况下,单击“文件”菜单,然后单击“打开项目”。 或者,您可以单击Ctrl + O。 浏览到Watcom安装文件夹(默认为C:\ Watcom,然后为Samples \ Win,然后打开mswin.wpj文件。您应该看到可以打开的大约30个C项目。

You can compile all of these in one go. Click Actions on the menu then Make All (or just press the F5 key). This should whizz through and compile the lot in under a minute. You can view the IDE Log window. If you want to save this window, right click on it then click Save As.

您可以一次编译所有这些文件。 单击菜单上的“操作”,然后单击全部制作 ”(或仅按F5键)。 这应该会在一分钟内完成并编译很多内容。 您可以查看“ IDE日志”窗口。 如果要保存此窗口,请右键单击它,然后单击“ 另存为”。

The Image shows the log after compiling.

该图像显示了编译后的日志。

If you make the same mistake as I did, and click Window/Cascade on the IDE menu, you'll end up with a diagonal stripe of minimized windows. To find the right project, click Window then (right at the bottom) ​More windows...

如果您犯了与我相同的错误,然后在IDE菜单上单击“窗口/级联”,您将得到最小化窗口的对角线条纹。 为了找到合适的项目,单击窗口,然后(右底部) 更多的窗户...

加载,编译和运行示例应用程序 ( Load, Compile and Run a Sample Application )

Sample Application - Life

Click the IDE Window menu and at the bottom of the drop-down menu, click More Windows ...

单击“ IDE窗口”菜单,然后在下拉菜单的底部,单击“ 更多窗口...”。

A popup form will appear, scroll down the list of projects until you find life\win 32\life.exe. Select this and click the OK button.

将出现一个弹出表单,向下滚动项目列表,直到找到life \ win 32 \ life.exe。 选择此项,然后单击确定按钮。

You'll see a list of all the project source code files and resource files. Click on this window and hit the F5 key. That will make the project. Now click the running man icon (it's the 7th icon) and the application will run. It's another version of the Game of Life that I featured in my blog.

您将看到所有项目源代码文件和资源文件的列表。 单击此窗口,然后按F5键。 那将使该项目。 现在单击正在运行的人图标(这是第7个图标),该应用程序将运行。 这是我在博客中精选的《人生游戏》的另一个版本。

That finishes this tutorial but feel free to load up the remaining samples and try them out.

这样就完成了本教程,但是可以随时加载其余示例并进行尝试。

翻译自: https://www.thoughtco.com/install-open-watcom-c-candand-compiler-958451

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值