EXG-0.95 under Linux

For COMP2100 at ANU, students are asked to use the EXG library -- an Eiffel library which allows us to create GUIs.

The EXG library does this by tieing into the GTK library, in C.

Problems:

  • The EXG library is extremely old (the last update was made August 2000).
    It was written for use with old GTK and ImLib libraries, and the previous version of GCC (2.x)
  • The GNU Eiffel compiler at the time was SmallEiffel.
    The current GNU Eiffel compiler is now SmartEiffel.
  • SmartEiffel has many differences to SmallEiffel. Some are as small as a class being renamed. Others are more complicated.

A temporary fix

A couple of COMP2100 students have been trying to get the EXG library to compile (and work) under Linux, with the SmartEiffel compiler. I haven't yet heard anyone scream "YES! I've done it".. So I gave it a try.

I took the latest EXG (0.95), and tried to make it compile (and work)... Here's the results.

Downloads

As there's not many people running Linux/PPC, I won't bother posting binaries.

If anyone can help me to get my gcc cross-compiler to work, I'd be happy to post binaries for as many architectures as GCC supports.

Crunch time

Currently, the modified library has been tested on the following systems:

  Mine Rob's
Architecture PowerPC Intel x86
Linux Debian/Woody Debian/Sid
SmartEiffel 1.1 1.0
ImLib 1.9.14 1.9.14
GDK-ImLib 1.9.14 1.9.14
GTK 1.2.10 1.2.10
X-Windows 4.2.1.1 4.3.0.1

with:

  1. The 'pgen' program, distributed with EXG 0.95
  2. COMP2100's Assignment 3.

By tested, I mean "run, and it displayed something". These have not been extensively tested.

I don't have another linux box to test it on.

I've tried compiling it on partch (Linux/x86), but it refuses to because the gdk-imlib headers aren't installed.

Why it's broken

EXG 0.95 doesn't work for a couple of reasons:

  1. The general/exg_file_tools.e file has a part which fetches a pointer from the C library.
    This was fixed on 13/05/2004 thanks to James Sullivan.
  2. Many of the classes EXG 0.95 references were obsoleted in SmartEiffel. I've tried to fix most of these.
  3. In many places, EXG 0.95 was referring to the 'get_environment_variable' feature.
    In SmallEiffel, this was a feature of ANY. In SmartEiffel, this was moved to class SYSTEM.
    I've fixed this by creating a local instance of SYSTEM, and using that.
  4. The original distribution uses some weird C preprocessor directives.
    While this doesn't prevent it from compiling with gcc-2.9.5/PPC; gcc-3.0+/x86 doesn't seem to like it.
    This was fixed on 15/03/2004 thanks to Michael da Hoog.

Disclaimer

If I don't put this here, someone will email me abuse.

I don't guarantee the stability of this. Don't write enterprise applications in this, and don't depend on this for your COMP2100 assignment.

Oh yeah, and don't write components for nuclear reactors with this (sorry, I couldn't help writing that).

If it breaks, it's your problem, not mine.

Acknowledgements

A couple of people have helped to make this work. Thanks to:

  1. James Sullivan, for fixing the getcwd problem.
    James also has written a Guide to installing EXG on Redhat 9.
  2. Michael de Hoog, for fixing the C preprocessor problems.
  3. Rob Weir, for testing the package on x86.