xmakemol-bugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XMakemol-bugs] glut problem on Fedora Core 5 and solution


From: Herbert Fruchtl
Subject: [XMakemol-bugs] glut problem on Fedora Core 5 and solution
Date: Fri, 09 Feb 2007 11:27:43 +0000
User-agent: Thunderbird 1.5.0.9 (X11/20070102)

Here is a problem and its solution. I am just reporting it so it can be integrated into the next release. It may even warrant a release; at least I found it pretty annoying.

The problem: On Fedora Core 5 x86_64 (I don't know if it also happens on 32-bit platforms), the program compiles and links OK. If you right-click an atom to select it, the program crashes with the following error:

freeglut ERROR: Function <glutBitmapCharacter> called without first calling 'glutInit'.

Apparently, in the latest versions of freeglut (2.4 and up), glutInit has to be called first.

The changes I made are:

In xmakemol.c:
- Add a prototype
        void glutInit(int *argcp, char **argv);
(I guess it would be cleaner to include glut.h or freeglut.h)
- add a call to this function early in main().

In Makefile:
- add -lglut to the flags in xmakemol_LDADD

I leave figuring out the proper #ifdefs and the exact location where the function call should go to the authors.

Cheers,

  Herbert
--
Herbert Fruchtl
EaStCHEM Fellow
School of Chemistry
University of St Andrews





reply via email to

[Prev in Thread] Current Thread [Next in Thread]