关于VC6.0下opengl编译出错的问题?
源代码:#include<windows.h>#include<GL/gl.h>#include<GL/glaux.h>voidmain(){auxInitDisplay...
源代码:
#include <windows.h>
#include <GL/gl.h>
#include <GL/glaux.h>
void main()
{
auxInitDisplayMode(AUX_SINGLE|AUX_RGBA);
auxInitPosition(0,0,500,500);
auxInitWindow("simple");
glClearColor(0.0,0.0,0.0,0.0);
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0,0.0,0.0);
glRectf(-0.5,-0.5,0.5,0.5);
glFlush();
_sleep(1000);
}
但是编译出错,实在不知道怎么回事了
opengl1.obj : error LNK2001: unresolved external symbol __imp__glFlush@0
opengl1.obj : error LNK2001: unresolved external symbol __imp__glRectf@16
opengl1.obj : error LNK2001: unresolved external symbol __imp__glColor3f@12
opengl1.obj : error LNK2001: unresolved external symbol __imp__glClear@4
opengl1.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16
opengl1.obj : error LNK2001: unresolved external symbol _auxInitWindowA@4
opengl1.obj : error LNK2001: unresolved external symbol _auxInitPosition@16
opengl1.obj : error LNK2001: unresolved external symbol _auxInitDisplayMode@4
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/opengl1.exe : fatal error LNK1120: 9 unresolved externals
就是简单根据安装指南配置了5个文件,然后开始用就不行了。 展开
#include <windows.h>
#include <GL/gl.h>
#include <GL/glaux.h>
void main()
{
auxInitDisplayMode(AUX_SINGLE|AUX_RGBA);
auxInitPosition(0,0,500,500);
auxInitWindow("simple");
glClearColor(0.0,0.0,0.0,0.0);
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0,0.0,0.0);
glRectf(-0.5,-0.5,0.5,0.5);
glFlush();
_sleep(1000);
}
但是编译出错,实在不知道怎么回事了
opengl1.obj : error LNK2001: unresolved external symbol __imp__glFlush@0
opengl1.obj : error LNK2001: unresolved external symbol __imp__glRectf@16
opengl1.obj : error LNK2001: unresolved external symbol __imp__glColor3f@12
opengl1.obj : error LNK2001: unresolved external symbol __imp__glClear@4
opengl1.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16
opengl1.obj : error LNK2001: unresolved external symbol _auxInitWindowA@4
opengl1.obj : error LNK2001: unresolved external symbol _auxInitPosition@16
opengl1.obj : error LNK2001: unresolved external symbol _auxInitDisplayMode@4
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/opengl1.exe : fatal error LNK1120: 9 unresolved externals
就是简单根据安装指南配置了5个文件,然后开始用就不行了。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询