Archive for the ‘Tools’ Category

When one starts using libraries, an problem that happens often is a linking error. Compilation went through but the linker complains that it cannot find something. A useful tool in this respect is nm and I will describe below how one can employ it. I will do it with my gcc example Compiling and Linking: Simple […]

At IMTEK, I have been working with Mathematica and I should say that it is a pretty good tool for fast prototyping. The only disadvantage is that it is a commercial tool and it is necessary to purchase a license. As a result, when I finished my work at IMTEK, I have decided to look what […]

John R. Levine, Linkers and Loaders, 1999 Linking is considered to be simple but quite many problems happens exactly at this stage. Especially when it is necessary to work with many libraries, the life gets complicated. The book gives a thorough overview on the linking process, what is linking and what one can expect at this […]

The text below is now obsolete, as in the newer version of BEBOP, the compiling under Cygwin goes without a problem. See Compiling BeBOP Sparse Matrix Converter under Cygwin. BeBOP Sparse Matrix Converter contains an executable that allows us to convert between different sparse matrix formats. I was given a file in the Harwell-Boeing […]

In the simple example considered above (see example with gcc and example with VC++) there were just a few commands to execute. A real project may contain much more files and libraries. A conventional way to automate build is to use make that reads the description in makefile and then executes the command accordingly. Let […]

A compiler converts a code to an object file and then a linker links different object files with each other. As a result, it is possible to mix programming languages in one project. What is just necessary is to know conventions accepted in different programming languages. Below there is a short description on how one […]

We need a text editor to edit files. It is assumed that you already have one. If not, I could recommend you Vim that is available for free at In my view it fits well the Unix environment. It is easy to install Vim. Just download self-installing executable gvim71.exe and run it. When it […]

The goal of this text is to compare the compilation process between Visual C++ and gcc (see Compiling and Linking: Simple Example with gcc). The process is quite similar but behavior of the tools in Visual Studio is a bit different. The librarian in Visual Studio is link and the compiler is cl. The sample […]

It is possible to run Microsoft compiler from console: cl, link, lib, and other tools. However, I find the cmd environment (command tool supplied with Windows) rather primitive and prefer to work under Cygwin environment. Here it is also possible to use command line tools from the Microsoft Visual Studio but it is necessary to […]

The goal of this text is to make a small introduction to the compilation process. We will make a library and then link the application code with the library. It is assumed that the librarian is ar and the compiler is gcc. The aim is to obtain rough understanding what steps will be necessary when […]

Cygwin ( is software that allows us to bring Unix flavor to Windows. This is a step-by-step tutorial on how to install Cygwin along with gcc and make. Provided that the number of packages to install is close to described below, it will be necessary to download about 35 Mb of files from Internet. The […]