Yesterday I compiled my first program based on the GLUT library
then I reinstalled the MingW compiler from the latest 2.9*
to the gcc version 3.2 (mingw special 20020817-1).
And the new compiler refused to compile the program, complaining that
[Warning] In function `glutInit_ATEXIT_HACK':
[Linker error] undefined reference to `__glutInitWithExit@...'
+ several similar lines (all related to "WithExit" functions)).
Well, I've made some research and experiments.
I've noticed I can compile the program using a
directive, but then the program does not exit automatically -
I have to kill it manually through the task manager.
Then I replaced libglut32.a with the file of the same name,
but coming from the MingW 2.95,
and now everything seems to work fine.
Then I searched this mailing list's archives, finding
some nice advice, but none of them seems to work for me.
Following them I tried to generate my own *.a file using dlltool and
pexports, but failed (I cannot solve the problem of @'s).
Anyway, why should *I* build my own libglut32.a if it is included in the
compiler's standard distribution?
Now the obvious questions:
1) what is the best thing I should do to compile my GLUT program(s)?
2) did I find a bug in MingW distribution? What's the difference between
the two libglut32.a files?
3) Can I /always/just in this case/ safely use the old *.a files? Or can it
potentially lead to serious problems?