error LNK2019: 无法解析的外部符号 "public: void __thiscall
2012-12-06 20:17
477 查看
错误信息:
error LNK2019: 无法解析的外部符号 "public: void __thiscall CArcBall::setBounds(int,int)" (?setBounds@CArcBall@@QAEXHH@Z),该符号在函数 "public: void __thiscall CChild3DView::OnSize(unsigned int,int,int)" (?OnSize@CChild3DView@@QAEXIHH@Z) 中被引用
1>D:\Visual Studio 2008\mod\mod\Debug\mod.exe : fatal error LNK1120: 1 个无法解析的外部命令
错误代码:
XXX.h
XXX.cpp
呵呵,因为之前这个函数的定义是直接放在.h文件里的,就用了inline,结果放到源文件里的时候就没有注意。。。。。
解决办法:
去掉 inline 就好了~~
error LNK2019: 无法解析的外部符号 "public: void __thiscall CArcBall::setBounds(int,int)" (?setBounds@CArcBall@@QAEXHH@Z),该符号在函数 "public: void __thiscall CChild3DView::OnSize(unsigned int,int,int)" (?OnSize@CChild3DView@@QAEXIHH@Z) 中被引用
1>D:\Visual Studio 2008\mod\mod\Debug\mod.exe : fatal error LNK1120: 1 个无法解析的外部命令
错误代码:
XXX.h
inline void setBounds(int NewWidth, int NewHeight);
XXX.cpp
void CArcBall::setBounds(int NewWidth, int NewHeight) { //设置长宽的调整因子 this->AdjustWidth = 1.0f / (((GLfloat)NewWidth - 1.0f) * 0.5f); this->AdjustHeight = 1.0f / (((GLfloat)NewHeight - 1.0f) * 0.5f); }
呵呵,因为之前这个函数的定义是直接放在.h文件里的,就用了inline,结果放到源文件里的时候就没有注意。。。。。
解决办法:
去掉 inline 就好了~~
相关文章推荐
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- 【C++】error LNK2019: 无法解析的外部符号 "public: void __thiscall
- error LNK2019: 无法解析的外部符号 "public: int __thiscall
- VC++常规错误之一:error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常规错误之一:error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常规错误之一:error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- 错误 2 error LNK2019: 无法解析的外部符号 "public: __thiscall obj3dModel::~obj3dModel(void)" (??1obj3dModel@@QAE
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常规错误之一:error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC++常见错误原因解析--error LNK2019: 无法解析的外部符号 "public: void __thiscall
- 错误 1 error LNK2019: 无法解析的外部符号 "public: __thiscall chain<int>::~chain<int>(void)" (??1?$chain@H@@QAE@
- error LNK2019: 无法解析的外部符号 "public: virtual void * __thiscall
- LNK2019: 无法解析的外部符号 "public: void __thiscall List<int>::add(int const &)" (?add@?$List@H@@QAEXABH@Z),
- error LNK2019: 无法解析的外部符号 _mysql_init@4,该符号在函数 "public: void