std::tr1::bind compile error binding to gluDeleteQuadric()
I'm using VS2008 with std::tr1 installed. Here's a stripped down program
that's not compiling:
#include <functional>
#include <windows.h>
#include <GL/glu.h>
void takeQuadric(GLUquadric* obj) {}
int main()
{
std::tr1::bind(&takeQuadric,std::tr1::placeholders::_1);
std::tr1::bind(&gluDeleteQuadric,std::tr1::placeholders::_1); // error
C2825: '_Fty': must be a class or namespace when followed by '::'
return 0;
}
The second bind call fails, probably because the function is declared with
APIENTRY:
void APIENTRY gluDeleteQuadric (
GLUquadric *state);
My WinDef.h says that APIENTRY is WINAPI and that WINAPI is __stdcall
#define WINAPI __stdcall
...
#define APIENTRY WINAPI
Anyone know why it fails to bind and if there is a way I can bind directly
to gluDeleteQuadric?
No comments:
Post a Comment