The Standard Function Library

The SFL (Standard Function Library) from iMatix is a portable function library for C/C++ programs. The SFL is the result of many years’ development, and is provided as Open Source software for the benefit of the Internet community.

The SFL provides about 450 functions that cover these areas:
Compression, encryption, and encoding;
Datatype conversion and formatting;
Dates, times, and calendars;
Directory and environment access;
User and process groups;
Inverted bitmap indices;
Symbol tables;
Error message files;
Configuration files;
String manipulation and searching;
File access;
Internet socket access;
Internet programming (MIME, CGI);
SMTP (e-mail) access;
Server (batch) programming;
Program tracing.

It is free software.

How are DLLs used on Cygwin 1.7?

Over the weekend I needed to set up a R6RS Scheme interpreter on Cygwin. It came down to either PLT or Ikarus. Both seem to be straightforward builds but I couldn’t make PLT happy so I went with Ikarus instead. It was a very simple and straightforward configuration and took maybe a minute to build. Once things were clearly working fine I figured I would try to get some of Ed’s OpenGL (box2d-lite and agave) demos running just for the fun of it.
Both of the programs depend on the GL and GLUT libraries. At runtime the correct DLL is loaded depending on the OS type. There wasn’t a setting for Cygwin so I added one. The thing was that I specified the wrong file name: /usr/lib/libGL.dll.a and /usr/lib/libglut.dll.a.
It was an uneducated guess in the first place. I figured there would be a one to one mapping. After Marco kindly kicked my butt on the Ikarus list though, by asking some basic questions like has it ever worked and have I checked out the difference in error messages, I got me thinking that I should have read up on this.
The Cygwin documentation here and the Redhat documentation here seem to explain it… Windows DLLs need additional information to be linked against. On Cygwin, when GCC sees .dll.a files it “knows” how to get the additional data out of them in case you want to link to Win32. Reading on in the Redhat documentation, it lists the DLL search path when you specify -L argument for GCC. In that list I saw that /bin is included. That surprised me.
It turns out that on Cygwin, DLLs that are not compiled to work with Win32 are located there. At least, this is my understanding. When you link to these DLLs though, the OpenGL demos work just fine on Cygwin with Ikarus.
Is this also your understanding? I need to dig in more to this topic.
I had been trying to get so many things working this weekend that I didn’t invest the amount of the time that this deserved, or most of those things for that matter.

Fun read on the evolution of C++

Last June I read “The Evolution of C++”. I was pleasantly surprised by just how fun it was to read. If you’ve ever read Bjarne Stroustrup before you know that he has got a sense of humor and frankness that makes his work quite accessible and informative.

The article covers the origins, the process and evolution, critics, users, researchers, big changes, strengths, and weaknesses of C++. On top of that, there are interesting historical bits that really let you put things in perspective. Unless you were there when it happened, you will definitely be surprised about the world surrounding C++ back when it got started.

For someone pretty unfamiliar with C++, it was a lot of fun to read about its goals, what it does well, and even what it does not so well. In the examples presented in the paper, you get to see the elegance of generic programming and the STL. There is even an overview of exploring functional programming with C++.

The article is quite long, 57 dense pages fill it out quite well. It is so well written and entertaining, though, that it is well worth the read.

For any of you long time C++ developers out there, I would be interested to hear your take on it.