NO

Author Topic: [FIXED] Fix glu.h?  (Read 2656 times)

iZzz32

  • Guest
[FIXED] Fix glu.h?
« on: April 24, 2014, 12:05:43 am »
When compiling with /W2 and including <GL/glu.h>:
Code: [Select]
#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>

void foo(void) {}

compiler produces a few warnings about missing prototypes:

Quote from: pocc -Ze -W2 test.c
...\PellesC\Include\Win\GL\glu.h(213): warning #2027: Missing prototype for '3', with type 'void __stdcall (*)()'.
...\PellesC\Include\Win\GL\glu.h(223): warning #2027: Missing prototype for '3', with type 'void __stdcall (*)()'.
...\PellesC\Include\Win\GL\glu.h(239): warning #2027: Missing prototype for '3', with type 'void __stdcall (*)()'.

I believe that void APIENTRY gluQuadricCallback(GLUquadric*,GLenum,void (CALLBACK*)()) should be void APIENTRY gluQuadricCallback(GLUquadric*,GLenum,void (CALLBACK*)(void)) etc.


Pelles C 7 and 8 RC2. Btw, Help->About in POIDE says that it is "Version 8.00.2 Release Candidate #1", but I'm 100% sure that I've installed RC2.
« Last Edit: April 27, 2014, 08:28:48 pm by iZzz32 »

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 761
Re: Fix glu.h?
« Reply #1 on: April 24, 2014, 03:34:40 am »
Btw, Help->About in POIDE says that it is "Version 8.00.2 Release Candidate #1", but I'm 100% sure that I've installed RC2.
+1
Definitely installed RC2 and it says RC1, both in the Abou box as well as in the splash screen

Ralf

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 1974
    • http://www.smorgasbordet.com
Re: Fix glu.h?
« Reply #2 on: April 26, 2014, 03:48:42 pm »
1) You are sure () means C++ "no parameters" and not C "any number of parameters"? For all three?
 gluQuadricCallback
 gluTessCallback
 gluNurbsCallback

2) Nothing changed in the IDE for RC2, so no good reason to modify the text.
/Pelle

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 761
Re: Fix glu.h?
« Reply #3 on: April 26, 2014, 09:43:38 pm »
2) Nothing changed in the IDE for RC2, so no good reason to modify the text.
Well, the reason is that it can confuse the heck out of people that don't know if RC2 properly installed over a previously installed RC1...

Ralf

iZzz32

  • Guest
Re: Fix glu.h?
« Reply #4 on: April 27, 2014, 03:14:28 pm »
1) You are sure () means C++ "no parameters" and not C "any number of parameters"? For all three?
Ok, I didn't used any of these 3 functions and you're right, callback arguments depend on which parameter. However I still think that wrapping #include <GL/glu.h> with #pragma warn just for Pelles C is a bit annoying.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 1974
    • http://www.smorgasbordet.com
Re: Fix glu.h?
« Reply #5 on: April 27, 2014, 04:18:46 pm »
Ok, I didn't used any of these 3 functions and you're right, callback arguments depend on which parameter. However I still think that wrapping #include <GL/glu.h> with #pragma warn just for Pelles C is a bit annoying.
I don't use OpenGL, so I really don't care either way. I have now added void, in the hope that this is correct (since I can't find a definitive answer using Google).

Well, the reason is that it can confuse the heck out of people that don't know if RC2 properly installed over a previously installed RC1...
You seem to be very easily confused, then.
/Pelle

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 761
Re: Fix glu.h?
« Reply #6 on: April 28, 2014, 01:23:39 am »
Well, the reason is that it can confuse the heck out of people that don't know if RC2 properly installed over a previously installed RC1...
You seem to be very easily confused, then.
Maybe... But I am sure I won't be the only one....  ;)

Ralf