链接器错误 2019 C++,VS2008

发布于 2024-12-27 19:08:20 字数 376 浏览 3 评论 0原文

我用的是VS 2008。 我有 Library 5 Lib 文件

A.lib 库文件 库文件 数据库文件 E.lib

A.Lib 包含B、C、D、E的所有头文件

现在我尝试使用A。 MFC 应用程序示例中的 Lib。

我已在示例应用程序中包含所有 lib 文件,并且所有项目的所有设置(如代码生成、字符集)都是相同的。我已经使 MFC 应用程序使用静态库。 我在 Lib A.lib(A.obj) 中收到链接器错误 2019 错误 LNK2019: 无法解析的外部符号 "public: void __thiscall _Tables::reclaimIfPossible(....

这里 reclaimIfPossible 函数是在 b.lib 中实现的

I am using VS 2008.
I have Library 5 Lib file

A.lib
B.lib
C.lib
D.lib
E.lib

A.Lib Include all the header file of B,C,D,E

Now I am trying to Use A.
Lib in MFC application Sample.

I Have Included all the lib file in Sample App and All the setting like code generation,character set is same for all the project. I have made MFC application to use static lib.
I am getting Linker error 2019 in Lib A.lib(A.obj) error LNK2019: unresolved external symbol "public: void __thiscall _Tables::reclaimIfPossible(....

Here reclaimIfPossible function is implemented in b.lib

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

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

发布评论

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

评论(1

纸伞微斜 2025-01-03 19:08:20

您必须链接到所有库。

仅链接到 A.lib 只会为您提供 A.lib 中定义的方法的符号。如果 A.lib 中的任何内容使用其他库中的任何内容,您将得到无法解析的外部符号。

You must link to all libraries.

Only linking to A.lib will only give you symbols for methods defined in A.lib. If anything in A.lib uses anything from the other libraries, you'll get unresolved external symbol.

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