xcode c++ 中的静态库

发布于 2024-12-28 19:37:34 字数 198 浏览 0 评论 0原文

我试图在我的项目中包含一个静态库( .a 文件)。所有这些都已正确包含,如果我将头文件包含在 Objective-C 类中,那么一切都会正常工作,并且我可以调用库中的函数。一旦我尝试在 Objective-C++ 类中执行相同的操作,就会产生错误 -

没有对 awt2_encode_file 的匹配函数调用

I'm trying to include a static library ( .a file ) in my project. It's all been included correctly and if I include the header file within an objective-c class it all works correctly and I can call the functions within the library. As soon as I try to do the same thing within an objective-c++ class an error is produced -

No matching function call to awt2_encode_file

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

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

发布评论

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

评论(1

梦屿孤独相伴 2025-01-04 19:37:34

只是一个预感,但是您的类文件扩展名是否为“m”而不是“mm”?如果混合使用 objC 和 c++,则需要使用“mm”。

Just a hunch, but do your class files have 'm' extension instead of 'mm'? Need to use 'mm' if you mix objC and c++.

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