如何解决“无法解析的外部符号”问题DirectX 11 程序中出现错误?

发布于 2024-12-12 03:00:00 字数 1197 浏览 0 评论 0原文

我正在为学校开发一个 DirectX 11 项目,并且在执行此操作时我完全遵循了本书的内容。我一直在想,也许有些东西被标记为错误的,但我仔细检查了我的所有文件,我所有的类名都很好(我相信它们很好),并仔细检查了我所有头文件的设置方式,一切都应该没问题,我仍然得到这个错误输出:

1>BlankDemo.obj : error LNK2019: unresolved external symbol "public: __thiscall DemoBase::DemoBase(void)" (??0DemoBase@@QAE@XZ) referenced in function "public: __thiscall BlankDemo::BlankDemo(void)" (??0BlankDemo@@QAE@XZ)
1>BlankDemo.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall DemoBase::~DemoBase(void)" (??1DemoBase@@UAE@XZ) referenced in function "public: virtual __thiscall BlankDemo::~BlankDemo(void)" (??1BlankDemo@@UAE@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall DemoBase::Shutdown(void)" (?Shutdown@DemoBase@@QAEXXZ) referenced in function _wWinMain@16
1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall DemoBase::Initialize(struct HINSTANCE__ *,struct HWND__ *)" (?Initialize@DemoBase@@QAE_NPAUHINSTANCE__@@PAUHWND__@@@Z) referenced in function _wWinMain@16
1>C:\Users\vaughn\documents\visual studio 2010\Projects\BlankWindow\Debug\BlankWindow.exe : fatal error LNK1120: 4 unresolved externals

我该如何解决这个问题?

I am working on a DirectX 11 project for school and I followed the book thoroughly when doing this. I keep thinking that maybe something is labeled wrong but I double checked all my files, all my class names are fine (I believe they are fine) and double checked how all my header files are setup and everything should be okay and I still get this error output:

1>BlankDemo.obj : error LNK2019: unresolved external symbol "public: __thiscall DemoBase::DemoBase(void)" (??0DemoBase@@QAE@XZ) referenced in function "public: __thiscall BlankDemo::BlankDemo(void)" (??0BlankDemo@@QAE@XZ)
1>BlankDemo.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall DemoBase::~DemoBase(void)" (??1DemoBase@@UAE@XZ) referenced in function "public: virtual __thiscall BlankDemo::~BlankDemo(void)" (??1BlankDemo@@UAE@XZ)
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall DemoBase::Shutdown(void)" (?Shutdown@DemoBase@@QAEXXZ) referenced in function _wWinMain@16
1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall DemoBase::Initialize(struct HINSTANCE__ *,struct HWND__ *)" (?Initialize@DemoBase@@QAE_NPAUHINSTANCE__@@PAUHWND__@@@Z) referenced in function _wWinMain@16
1>C:\Users\vaughn\documents\visual studio 2010\Projects\BlankWindow\Debug\BlankWindow.exe : fatal error LNK1120: 4 unresolved externals

How do I solve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

醉殇 2024-12-19 03:00:00

显然,您要么没有实现 DemoBase 类中的一些方法(包括其构造函数和析构函数),要么没有将实现文件包含在要编译或链接的文件列表中你的程序。实现它们,然后确保您已将源文件包含在项目中。

Evidently, you either haven't implemented a handful of methods from the DemoBase class (including its constructor and destructor), or you haven't included the implementation file in the list of files to compile or link with your program. Implement them, and then make sure you've included the source file in your project.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文