首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C语言 >

vs2010无法解析的外部命令,该如何解决

2013-09-28 
vs2010无法解析的外部命令,该怎么解决1------ 已启动生成: 项目: 三维, 配置: Debug Win32 ------1生成

vs2010无法解析的外部命令,该怎么解决
1>------ 已启动生成: 项目: 三维, 配置: Debug Win32 ------
1>生成启动时间为 2013/9/21 18:55:58。
1>InitializeBuildStatus:
1>  正在对“Debug\三维.unsuccessfulbuild”执行 Touch 任务。
1>ClCompile:
1>  所有输出均为最新。
1>三维.obj : error LNK2019: 无法解析的外部符号 _auxDIBImageLoadA@4,该符号在函数 "struct _AUX_RGBImageRec * __cdecl LoadBMP(char *)" (?LoadBMP@@YAPAU_AUX_RGBImageRec@@PAD@Z) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glTexParameteri@12,该符号在函数 "int __cdecl LoadGLTextures(void)" (?LoadGLTextures@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glTexImage2D@36,该符号在函数 "int __cdecl LoadGLTextures(void)" (?LoadGLTextures@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glBindTexture@8,该符号在函数 "int __cdecl LoadGLTextures(void)" (?LoadGLTextures@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glGenTextures@8,该符号在函数 "int __cdecl LoadGLTextures(void)" (?LoadGLTextures@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 _gluPerspective@32,该符号在函数 "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glLoadIdentity@0,该符号在函数 "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glMatrixMode@4,该符号在函数 "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glViewport@16,该符号在函数 "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glHint@8,该符号在函数 "int __cdecl InitGL(void)" (?InitGL@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glDepthFunc@4,该符号在函数 "int __cdecl InitGL(void)" (?InitGL@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glClearDepth@8,该符号在函数 "int __cdecl InitGL(void)" (?InitGL@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glClearColor@16,该符号在函数 "int __cdecl InitGL(void)" (?InitGL@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glShadeModel@4,该符号在函数 "int __cdecl InitGL(void)" (?InitGL@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glEnable@4,该符号在函数 "int __cdecl InitGL(void)" (?InitGL@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glEnd@0,该符号在函数 "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glVertex3f@12,该符号在函数 "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glTexCoord2f@8,该符号在函数 "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glBegin@4,该符号在函数 "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glRotatef@16,该符号在函数 "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glTranslatef@12,该符号在函数 "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glClear@4,该符号在函数 "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__wglDeleteContext@4,该符号在函数 "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__wglMakeCurrent@8,该符号在函数 "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__wglCreateContext@4,该符号在函数 "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z) 中被引用
1>C:\Users\xuchenyang\documents\visual studio 2010\Projects\三维\Debug\三维.exe : fatal error LNK1120: 25 个无法解析的外部命令
1>
1>生成失败。
1>
1>已用时间 00:00:00.28
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
vs2010 debug
[解决办法]
无法解析一般是头文件没有添加吧。
[解决办法]
头文件,和库的问题
------解决方案--------------------


需先安装和配置freeglut库,参考http://blog.csdn.net/dayeshisir/article/details/7433631

引用:
1>------ 已启动生成: 项目: 三维, 配置: Debug Win32 ------
1>生成启动时间为 2013/9/21 18:55:58。
1>InitializeBuildStatus:
1>  正在对“Debug\三维.unsuccessfulbuild”执行 Touch 任务。
1>ClCompile:
1>  所有输出均为最新。
1>三维.obj : error LNK2019: 无法解析的外部符号 _auxDIBImageLoadA@4,该符号在函数 "struct _AUX_RGBImageRec * __cdecl LoadBMP(char *)" (?LoadBMP@@YAPAU_AUX_RGBImageRec@@PAD@Z) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glTexParameteri@12,该符号在函数 "int __cdecl LoadGLTextures(void)" (?LoadGLTextures@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glTexImage2D@36,该符号在函数 "int __cdecl LoadGLTextures(void)" (?LoadGLTextures@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glBindTexture@8,该符号在函数 "int __cdecl LoadGLTextures(void)" (?LoadGLTextures@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glGenTextures@8,该符号在函数 "int __cdecl LoadGLTextures(void)" (?LoadGLTextures@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 _gluPerspective@32,该符号在函数 "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glLoadIdentity@0,该符号在函数 "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glMatrixMode@4,该符号在函数 "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glViewport@16,该符号在函数 "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glHint@8,该符号在函数 "int __cdecl InitGL(void)" (?InitGL@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glDepthFunc@4,该符号在函数 "int __cdecl InitGL(void)" (?InitGL@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glClearDepth@8,该符号在函数 "int __cdecl InitGL(void)" (?InitGL@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glClearColor@16,该符号在函数 "int __cdecl InitGL(void)" (?InitGL@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glShadeModel@4,该符号在函数 "int __cdecl InitGL(void)" (?InitGL@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glEnable@4,该符号在函数 "int __cdecl InitGL(void)" (?InitGL@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glEnd@0,该符号在函数 "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glVertex3f@12,该符号在函数 "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glTexCoord2f@8,该符号在函数 "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glBegin@4,该符号在函数 "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glRotatef@16,该符号在函数 "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glTranslatef@12,该符号在函数 "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__glClear@4,该符号在函数 "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__wglDeleteContext@4,该符号在函数 "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__wglMakeCurrent@8,该符号在函数 "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ) 中被引用
1>三维.obj : error LNK2019: 无法解析的外部符号 __imp__wglCreateContext@4,该符号在函数 "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z) 中被引用
1>C:\Users\xuchenyang\documents\visual studio 2010\Projects\三维\Debug\三维.exe : fatal error LNK1120: 25 个无法解析的外部命令
1>
1>生成失败。
1>
1>已用时间 00:00:00.28
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========

[解决办法]
项目、属性、链接器、常规、附加库目录:填写附加依赖库所在目录 分号间隔多项
项目、属性、链接器、输入、附加依赖项:填写附加依赖库的名字.lib 空格或分号间隔多项

热点排行