PDA

View Full Version : VC++ compiling gluTessCallBack



BillJ
08-02-2001, 09:39 AM
I have been trying to get the gluTessCallback functions to work with VC++ using the the example tess.c and moving to program tess.cpp
the tess.c program runs fine however when I
compile the same code snip in VC++ I get the following error

I have work with alot of OpenGL but fairly new with VC++ help!!! http://www.opengl.org/discussion_boards/ubb/smile.gif

'gluTessCallback' : cannot convert parameter 3 from 'void (const double *)' to 'void (__stdcall *)(void)'
None of the functions with this name in scope match the target type
'gluTessCallback' : cannot convert parameter 3 from 'void (unsigned int)' to 'void (__stdcall *)(void)'
None of the functions with this name in scope match the target type

Sebb
08-03-2001, 02:37 AM
Your error looks a bit strange but I'd say that it is a link error, isn't it ? If it is, it's because you forgot to link opengl32.lib to your project. If you don't know how to do, ask me....
If it is a compilation error, I don't know what is the reason...

mikael_aronsson
08-03-2001, 02:39 AM
Hi !

Your callback functions are C++ functions, not C functions, you need to use

extern "C" in front of your callback function definitions.

You may also need to do some type casting as C++ is much more picky about the types.

Mikael