Category Archives: Linux development

OpenSuse 11.4 Ralink RT3090 2.4.0.4 driver rpm packages

OpenSUSE LogoIn one of my last articles I've wrote about excellent Ralink RT3090 Ubuntu driver PPA by Launchpad user Markus Heberling, thanks Markus for your work. Here is the link to this article:

Wireless network Ralink RT3090 Ubuntu driver PPA

Recently I've had to use OpenSuse 11.4 on a laptop with RT3090 wireless network adapter. On OpenSuse you are left with open source drivers that work great but not as good as Ralink proprietary drivers. In this article I'm bringing you OpenSuse 11.04 rpm packages with Ralink RT3090 2.4.0.4 proprietary wireless driver for 32-bit architecture. I'm also providing OpenSuse src.rpm packages you can use to rebuild this driver package for your kernel architecture or kernel version. For this packages I've backported all Markus Heberling Ralink rt3090 driver patches from his Ubuntu RT3090 PPA.

Continue reading

Prolog programming using Gprolog on Linux

Prolog is a logical programming language perfect for description of artificial intelligence knowledge base I was working on for one of my AI projects. The idea is that you make a knowledge base and then ask your knowledge base what ever you need to know. As Linux user I needed Linux tool so I went on Google and inquired about my options. I really like GNU software so I've opted for GNU Prolog implementation called Gprolog. In this little article I will show you how to get it working on Debian based operating systems.

Continue reading

C/C++ library programming on Linux - Part three: Dynamic libraries using POSIX API

This is my third article in the “C/C++ library programming on Linux” series. I strongly suggest you read the first two parts parts of this article series where I’ve given some background about libraries on Linux operating system and explained static and dynamic libraries.

C/C++ library programming on Linux – Part one: Static libraries

C/C++ library programming on Linux – Part two: Dynamic libraries

In this third article I will explain the most interesting way of reusing code using libraries on Linux operating system - by using POSIX ("Portable Operating System Interface for Unix") application programming interface. Using POSIX functions dlopen(), dlsym(), dlclose() and dlerror() you can load and unload your shared libraries during the course of your programs operation. This functions present interface to the Linux dynamic linking loader explained in the first part of my "C/C++ library programming on Linux" article series. This system calls are typically used for implementing stuff like plugins for your application so that you can load functionality provided inside plugin specific dynamic library on-demand. So here's simple example of loading dynamic library into the "cprog" program presented inside my first article "C/C++ library programming on Linux – Part one: Static libraries".

Continue reading

C/C++ library programming on Linux – Part two: Dynamic libraries

This is my second article in the "C/C++ library programming on Linux" series. I recommend that you read the first part of this article series where I've explained the whole library thing, and gave an example of creating and using static library.

C/C++ library programming on Linux – Part one: Static libraries

In this article I will explain dynamic libraries and compare them to static libraries. I will also give an example of creating and using dynamic library.

Dynamic (shared) libraries

Dynamic libraries are different from static libraries in a way that by using them, during compilation process, GCC ads only code "hooks" and soname. That "hooks" and library soname are used during the startup of your application to load correct library and connect "inside" with the "outside" code.

Continue reading

C/C++ library programming on Linux - Part one: Static libraries

Background

One of the most important aspects of modern programming is concept of reuse of code. Even C programming language allows us to reuse our code using concepts like simple functions and structures. C++ programming language goes one step further and allows us to group related variables and functions into classes with the same purpose - the reuse of our valuable code. By using libraries we can go even further from sharing code inside one process - we can share code between completely different programs.

What changes when using libraries? Answer to that question is: "link phase" of your program. In this phase GNU linker links all code modules in fully functional program. When it comes to libraries on Linux operating system we have two basic concepts: static and dynamic (often called "shared"). In this article series I will do my best to explain both Linux libraries concepts using simple C language examples.

Continue reading