Thursday, September 08, 2005

 

Adding external libraries to KDevelop

My current version of KDevelop is a nice one, but still lacks interface-based configuration of external libraries. As the whole majority of free IDE's, KDevelop is based on GNU automake/configure to manage the libraries and sources, and finally create a Makefile that the 'make' command reads to make the proper compiler/linker calls.

Ok, so, this trick is valid for all systems of this kind. I'll configure for this example the Gnu Scientific Library (GSL):

Locate a file named configure.in inside your project directory. Open it and put the following lines anywhere:

AC_CHECK_LIB(m,main)
AC_CHECK_LIB(gslcblas,main)
AC_CHECK_LIB(gsl,main)

What are we doing with this? Easy one: We're checking the existence of an entry called 'main' inside the libraries m, gslcblas and gsl, which must be located in the library path (/usr/lib, /usr/local/lib...).

Now, the next step is to execute automake and folks and then execute the generated 'configure' script, which happens to create a set of Makefile's that tell the compiler/linker to work with '-lm -lgslcblas -lgsl'.

So, now, if you run 'make', you must see those libraries are being linked. You can repeat this operation with, for example, SDL_Image lib, just writing AC_CHECK_LIB(SDL_Image,main) to your configure.in file.

Hope that this helps somebody! Thanks for the KDE, KDevelop and GSL teams for their nice work.
 

Sunday, September 04, 2005

 

First message and presentation

It's a pleasure for me to write the first message of this science-related electronic notebook. My name is Jon Agirre, I'm a computer engineer and I'm currently (2005) working on my Ph.D. on Protein Crystallography. Yes, sounds strange, but this is the path I chose two years ago. I felt that the only way I could "make science" with my computing knowledge was helping other sciences, applying computing skills to the resolution of BIG problems. So, I contacted researchers from very different fields to try to obtain a unique motivation for my Ph.D.

And now, I'm here to become a crystallographer. Two years passed since I made my decission, but that's nothing compared to the amount of time I will spend increasing my ignorance.

This page is powered by Blogger. Isn't yours?