PDA

View Full Version : gluIinit_ATEXIT_HACK



swade
11-20-2003, 04:00 AM
Hi,
does anyone know what this means? I just
wanted to initialize glut with the following
code line:

void glutInit(int *argc, char **argv);

and the compiler just reported an error:

'glutInit_ATEXIT_HACK' : redefinition; different type modifiers.

I wasn't able to find something 'bout it
in the documentation.... HELP !!

Bob
11-20-2003, 05:28 AM
Put #define GLUT_DISABLE_ATEXIT_HACK before including the GLUT header.

dvm
11-21-2003, 12:07 PM
I don't think the previous answer is any good at all. Do check up on your programming skills because what you are doing is creating another function prototype instead of calling the function glutInit. I assume your main function looks like this:



int main(int argc, char *argv[])
{
....
glutInit(&argc, argv);
....
}

You only have to pass the main arguments to glutInit. Notice the ampersand with argc. It's because glutInit takes 2 pointers as arguments, only the 2nd one is already a pointer.
Good Luck.