Compile error on VC++ 6

I’m trying to compile a UNIX based code on my PC(Win98/Visual C++ 6). I get the following error msg.


\Work estfield\assignment4.c(176) : error C2152: ‘function’ : pointers to functions with different attributes


and the line 176 is as follows


auxExposeFunc(reshape);


The code compiles fine on UNIX.
What do I need to do to resolve this problem?

If you’re using VC++, you might want to try turning off Microsoft Language Extensions if you’re porting code from Unix. Go to Project, Settings, C++. In the drop down bow choose Customize and check Disable Language Extensions.

How is auxExposeFunc() defined, and how is reshape defined?

Originally posted by Elixer:
[b]How is auxExposeFunc() defined, and how is reshape defined?

[/b]

It’s one of the glaux library function.

Originally posted by thasmin:
If you’re using VC++, you might want to try turning off Microsoft Language Extensions if you’re porting code from Unix. Go to Project, Settings, C++. In the drop down bow choose Customize and check Disable Language Extensions.

Thanks. I will try that and see what happens.

From glAux.h

typedef void (CALLBACK* AUXEXPOSEPROC)(int, int);
void APIENTRY auxExposeFunc(AUXEXPOSEPROC);

Is your reshape defined like so?..

void reshape(int x, int y);

If you’re using unsigned ints instead of ints, then your function definition won’t match the function that auxExposeFunc is looking for.