无法解析外部符号main的外部符号,该怎么处理

15:38 提问
无法解析的外部符号 __imp__PathFileExistsA@怎么解决,需要添加什么lib
主程序.obj : error LNK2019: 无法解析的外部符号 impPathFileExistsA@4,该符号在函数 "void __cdecl setBoot(void)" (?setBoot@@YAXXZ) 中被引用这需要
按赞数排序
api函数,检查h文件和lib文件有没有包含对
需要添加头文件的lib,这里是Shlwapi.lib
在MSDN里查找PathFileExists函数,里面就有链接库
msdn说的很清楚。
其他相关推荐vs2010无法解析的外部命令,该怎么解决
来源:csdn
【1>------ 已启动生成: 项目: 三维, 配置: Debug Win32 ------
1>生成启动时间为
18:55:58。
1>InitializeBuildStatus:
正在对“Debug\三维.unsuccessfulbuild”执行 Touch 任务。
1>ClCompile:
所有输出均为最新。
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>已用时间 00:00:00.28
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========】
无法解析一般是头文件没有添加吧。
lm_whales:
头文件,和库的问题
xcy123411:
已解决,没有添加lib文件,谢谢
需先安装和配置freeglut库,参考http://blog.csdn.net/dayeshisir/article/details/7433631
只有声明没有定义
zhao4zhong1:
项目、属性、链接器、常规、附加库目录:填写附加依赖库所在目录 分号间隔多项
项目、属性、链接器、输入、附加依赖项:填写附加依赖库的名字.lib 空格或分号间隔多项
没有正确添加库和头文件
免责声明:本站部分内容、图片、文字、视频等来自于互联网,仅供大家学习与交流。相关内容如涉嫌侵犯您的知识产权或其他合法权益,请向本站发送有效通知,我们会及时处理。反馈邮箱&&&&。
学生服务号
在线咨询,奖学金返现,名师点评,等你来互动安全检查中...
请打开浏览器的javascript,然后刷新浏览器
< 浏览器安全检查中...
还剩 5 秒&error LNK2001: 无法解析的外部符号怎么解决
error LNK2001: 无法解析的外部符号怎么解决
vs2005, c++类似的错误有500+条,怎么办?llcommon.lib(llstring.obj) : error LNK2019: 无法解析的外部符号 &__declspec(dllimport) public: static void __cdecl std::_String_base::_Xran(void)& (__imp_?_Xran@_String_base@std@@SAXXZ),该符号在函数 &public: class std::basic_string,class std::allocator & & __thiscall std::basic_string,class std::allocator &::assign(class std::basic_string,class std::allocator & const &,unsigned int,unsigned int)& (?assign@?$basic_string@IU?$char_traits@I@std@@V?$allocator@I@2@@std@@QAEAAV12@ABV12@II@Z) 中被引用llcommon.lib(llfixedbuffer.obj) : error LNK2001: 无法解析的外部符号 &__declspec(dllimport) public: static void __cdecl std::_String_base::_Xran(void)& (__imp_?_Xran@_String_base@std@@SAXXZ)llcommon.lib(llsdserialize.obj) : error LNK2019: 无法解析的外部符号 &__declspec(dllimport) public: class std::basic_string,class std::allocator & & __thiscall std::basic_string,class std::allocator &::replace(class std::_String_iterator,class std::allocator &,class std::_String_iterator,class std::allocator &,class std::basic_string,class std::allocator & const &)& (__imp_?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@0ABV12@@Z),该符号在函数 &public: class std::basic_string,class std::allocator & & __thiscall std::basic_string,class std::allocator &::_Replace & &(class std::_String_iterator,class std::allocator &,class std::_String_iterator,class std::allocator &,class std::_Vector_iterator &,class std::_Vector_iterator &,struct std::input_iterator_tag)& (??$_Replace@V?$_Vector_iterator@DV?$allocator@D@std@@@std@@@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@V?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@1@0V?$_Vector_iterator@DV?$allocator@D@std@@@1@1Uinput_iterator_tag@1@@Z) 中被引用llcommon.lib(llfile.obj) : error LNK2001: 无法解析的外部符号 &protected: virtual class std::fpos __thiscall std::basic_filebuf &::seekoff(long,int,int)& (?seekoff@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z)llcommon.lib(llfile.obj) : error LNK2001: 无法解析的外部符号 &protected: virtual void __thiscall std::basic_filebuf &::imbue(class std::locale const &)& (?imbue@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEXABVlocale@2@@Z)llcommon.lib(llfile.obj) : error LNK2019: 无法解析的外部符号 &__declspec(dllimport) public: class std::basic_ostream & & __thiscall std::basic_ostream &::seekp(long,int)& (__imp_?seekp@?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV12@JH@Z),该符号在函数 &int __cdecl llofstream_size(class llofstream &)& (?llofstream_size@@YAHAAVllofstream@@@Z) 中被引用llcommon.lib(llstat.obj) : error LNK2019: 无法解析的外部符号 &__declspec(dllimport) public: class std::basic_ostream & & __thiscall std::basic_ostream &::operator&&(unsigned __int64)& (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@_K@Z),该符号在函数 &public: void __thiscall LLStatAccum::sum(double,unsigned __int64)& (?sum@LLStatAccum@@QAEXN_K@Z) 中被引用llcommon.lib(llmemorystream.obj) : error LNK2001: 无法解析的外部符号 &protected: virtual class std::fpos __thiscall std::basic_streambuf &::seekoff(long,int,int)& (?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JHH@Z)E:\GIS\opensim\Hippo Build\win_crash_logger\RelWithDebInfo\windows-crash-logger.exe : fatal error LNK1120: 42 个无法解析的外部命
昵称: alyba &时间:
昵称: jackyjkchen &时间:
昵称: lanhxg &时间:
昵称: alyba &时间:dll中无法解析的外部符号的处理方法
编译环境:VC2005
要调用的函数已经放在了动态链接库(dll)中,但编译时出现错误说:无法解析的外部符号。
工程中已经包含了 .h 文件。
解决方法:在调用的那个工程里面加入 & #pragma &
comment(lib,"lib文件名")
参考:http://topic.csdn.net/t//3159872.html
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

我要回帖

更多关于 qt无法解析的外部符号 的文章

 

随机推荐