Hello. I’m trying to compile “Red Book” code samples in VC++ 6, but it gives me that errors:
C:\Archivos de programa\Microsoft Visual Studio\MyProjects est2 est1.cpp(41) : error C2664: ‘auxReshapeFunc’ : cannot convert parameter 1 from ‘void (int,int)’ to ‘void (__stdcall *)(int,int)’
None of the functions with this name in scope match the target type
C:\Archivos de programa\Microsoft Visual Studio\MyProjects est2 est1.cpp(42) : error C2664: ‘auxMainLoop’ : cannot convert parameter 1 from ‘void (void)’ to ‘void (__stdcall *)(void)’
None of the functions with this name in scope match the target type
Originally posted by McOwen:
[b]Hello. I’m trying to compile “Red Book” code samples in VC++ 6, but it gives me that errors:
C:\Archivos de programa\Microsoft Visual Studio\MyProjects est2 est1.cpp(41) : error C2664: ‘auxReshapeFunc’ : cannot convert parameter 1 from ‘void (int,int)’ to ‘void (__stdcall *)(int,int)’
None of the functions with this name in scope match the target type
C:\Archivos de programa\Microsoft Visual Studio\MyProjects est2 est1.cpp(42) : error C2664: ‘auxMainLoop’ : cannot convert parameter 1 from ‘void (void)’ to ‘void (__stdcall *)(void)’
None of the functions with this name in scope match the target type
If I’m remembering error messages properly the problem is that the code in your glAux library is using standard C mangling on the names but your compiler is probably defaulting to C++… you can enclose your example code in an extern “c” {} block, or adjust the settings of your compiler to mangle the names differently. (Somewhere under project settings in VC++).