Downloading program count

The program exists in several compiled (executable) versions, for different operating systems, and also as a source code in C++. In order to download it, click on one of the following links.

For Macintosh

Compiled and tested under Mac OS X version 10.4.10, Mac mini with Intel Core Duo processor. Since I have no experience with Mac, I cannot tell if it will work with another machine. If not, you can always download the source code and compile it.

For Windows 98, XP, and Vista

Compiled with Dev-C++ 4.9.9.1, gcc version 3.3.1, under Windows XP. Tested with XP and Vista Professional Edition. It will work for sure under Windows 98, and perhaps even '95.

For Linux

Compiled with gcc version 4.1.2, and tested under Linux Debian, version 2.6.18-5-686. I think it should work on other Linux systems based on Intel/AMD processors.

Source code

Source code in C++ language. Only few comments are given.

Installation

Suppose that you have created a directory count and downloaded the file into it. If you have downloaded the source code, you have to compile it first. When you have compiled the program, you should have the file count.exe. If you have downloaded the zipped version of the executable file, unpack it either from the commad line:

> unzip *.zip

or use a program like Total Commander or WinZip, to obtain count.exe. This is in principle all, and the program can be used (remember that under Linux you should write ./count.exe to run the program, under Windows only the name is needed). There is, however, one difficulty - to run it, the user has to be either in the directory count, or to give explicitely the path to the file count.exe when operating in another directory. This is inconvenient but can be simply fixed. There are two ways: either to copy the file count.exe to the directory where executable files are stored (/bin under Linux or Mac) or to tell the operating system where the file can be found. I will describe only the first method.

Under Linux/Mac

Find the /bin directory. It is located in the root directory. Sometimes, each user has his own /bin, in the /home directory. Copy the file count.exe to one of them (you have to be a superuser in order to write to /root/bin, so better use the local one, in your own home directory). Go to that directory and set the file attribute to:

> chmod a+rwx count.exe

Now, to check if everything works, go out of that directory and type count.exe. If program starts, then it is OK.

Under Windows 98 and XP

Copy the file count.exe to the directory /windows/system32 . Run the command line (cmd.exe) and type count.exe. If program starts, then it is OK.

Under Windows Vista

I do not like this system, so no instructions shall be given... Probably, the method for Win XP can be adapted, but I am not sure if it will work - one need to write to the /windows directory which is probably not allowed. Maybe it will work for administrator account?

Compilation

The program count is written in C++ has been designed to be compiled under GNU g++ compiler which is available for free in the Internet. It is probably possible to use another compiler, but I can give a detailed instruction only for GNU's g++. I assume that the user has something like a command line (shell) where he/she can type some commands. After downloading the file *.zip, it should be copied to some new, empty directory, e.g. created in the following way:

> mkdir count

Go to this directory by typing cd count. Then, the *.zip file should be unpacked:

> unzip *.zip

which results in two new files in the directory count. To compile the program, simply type:

> g++ count.cpp -lm -O3 -o count.exe

If everything is O.K., no messages will be displayed and a new file count.exe will be created. Type

> count.exe -h                 (under Windows)
> ./count.exe -h                 (under Linux/Mac)

to display program's options and check if it works and go to the Installation section.

Questions, comments?

I am not sure if this page is instructive enough. Bear in mind that I am neither a computer scientist nor a Linux/Windows expert (see my homepage for explanation). Just write me in case you think that something should be added/changed. My email can be found here.