19,471
社区成员




//C++中建立一文件,其代码如下,但运行有错误,不知道怎么回事?
#include<gl/glaux.h>
void CALLBACK reshape(GLsizei w,GLsizei h)
{
}
void CALLBACK display(void)
{
auxWireSphere(1);
glFlush();
}
void main(void)
{
auxInitPosition(0,0,500,500);
auxInitDisplayMode(AUX_SINGLE|AUX_RGBA);
auxInitWindow("opengl");
auxReshapeFunc(reshape);
auxMainLoop(display);
}
//错误提示:
/*
--------------------Configuration: Cpp1 - Win32 Debug--------------------
Linking...
Cpp1.obj : error LNK2001: unresolved external symbol __imp__glFlush@0
Cpp1.obj : error LNK2001: unresolved external symbol _auxWireSphere@8
Cpp1.obj : error LNK2001: unresolved external symbol _auxMainLoop@4
Cpp1.obj : error LNK2001: unresolved external symbol _auxReshapeFunc@4
Cpp1.obj : error LNK2001: unresolved external symbol _auxInitWindowA@4
Cpp1.obj : error LNK2001: unresolved external symbol _auxInitDisplayMode@4
Cpp1.obj : error LNK2001: unresolved external symbol _auxInitPosition@16
Debug/Cpp1.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.
Cpp1.exe - 8 error(s), 0 warning(s)
*/