OS/2 eZine - http://www.os2ezine.com
16 January 2002
James Cannon actively served 12 years in the U.S. Army with a broad range of experience from programming COBOL on a mainframe, to networking simulators with UNIX, and supervising a small IT shop. He continues military service in the U.S. Army Reserve. He is currently working for Agilent Technologies as a "Technical Lead" overseeing the backup operations of 5000+ HP-UX and Windows clients. He is happily married, a proud father, and never gets enough keyboard and mouse time with OS/2 Warp.

If you have a comment about the content of this article, please feel free to vent in the OS/2 eZine discussion forums.

There is also a Printer Friendly version of this page.

Previous Article
Next Article

OS/2.org - where I want to go.

EMX - It's more than a Runtime

If you've used a lot of software downloaded from Hobbes, or any other location on the Internet, you will often find a "README" text file that states, "requires EMX to run." So, off you go to find this EMX Runtime. So, what is this EMX? As you'll find out, EMX is more than a runtime.

A lot of software is developed using a common dynamic-link library, also known as a "DLL", due to the file extension used (.dll). The EMX runtime is used in this manner by a lot of programs. Some of you may ask, why? The reason for doing this is that it allows for a smaller program to be distributed.

OK, so where is this EMX runtime? The best place I go for files is the well-organized "Hobbes", hosted by the Department of Computing and Networking at New Mexico State University in Las Cruces, NM. First, get your browser pointed to: hobbes.nmsu.edu. When you get there you will see a nice interface that also includes a search engine. I usually just "drill down" by following the link for /pub/os2, then going to dev, and finally selecting emx. This can also be accessed by using the web page controls for "Directory" and inserting /pub/os2/dev/emx and hitting the "Browse" button. I usually take the slow and cumbersome path, as I will always see something else that catches my eye.

Now you have a choice to make: v0.9c or v0.9d. I would recommend going with the newer v0.9d, some people may have reasons to select the other. Either way, you will see a collection of zip files (.zip extension) and an INSTALL.DOC and also a README.DOC. The main .zip file you want installed on your system is the emxrt.zip. This will be used by other programs and the EMX C/C++ compiler. The zip files will create a directory tree from the point you unzip them. I put mine at the root of my D: drive, so that when it is unzipped, it will create a D:\emx directory tree. Of course you will have to decide where you want to have it based on your needs.

Once emxrt.zip has been unpacked, the next step is to modify your CONFIG.SYS file and reboot.

  1. Add \emx\dll to the end of your LIBPATH (example: LIBPATH=D:\emx\dll).
  2. Add \emx\bin to the end of your PATH (example: PATH=D:\emx\bin).
  3. Add \emx\book to your SET BOOKSHELF statement to view information about the EMX Runtime using OS/2's help viewer. (example: SET BOOKSHELF=D:\emx\book).

    * For additional options to the EMX Runtime, please see the file: \emx\doc\emxrt.doc for other modifications to your CONFIG.SYS file.

  4. Reboot.

To be sure we are on track, let's check the status of our EMX Runtime installation. First open an OS/2 Command Window, and enter: emxrev

If you see similiar output, you have everything set properly. You will now be able to use a lot more software. Now, I'm sure when you followed the link to Hobbes, you saw a lot more files than the one we downloaded. You were perhaps curious what they are, and why I didn't mention them. As I said earlier, EMX is more than a runtime. It is a whole development system. It includes C, C++, Objective C and also other languages like ADA. Fact is, all the software you download needing the EMX Runtime, was compiled with these EMX tools.

If you're interested in developing software for OS/2, you will want to look at EMX. Start off with some text based applications using C and later C++. After that, you will want to venture on to Presentation Manager (PM) programming with EMX. There's a lot of power in EMX. Best of all, it's free to use, so if you are starting out, check out EMX. If programming isn't what you thought it was, be glad you didn't pay a lot of money for an expensive compiler.

Previous Article
Next Article

Copyright (C) 2002. All Rights Reserved.