链接到libxml2.lib文件的Windows,但找不到外部符号

发布于 2025-01-31 11:53:00 字数 718 浏览 4 评论 0原文

我已经用最新的2.9.14源构建了libxml2.dll。我成功地创建了.dll.lib文件。我已经将.lib文件链接到了我的项目,但是在编译时间方面,它似乎无法解析我在程序中进行的任何libxml函数调用。似乎.lib文件不完整。

过去,我已经使用了旧版本的libxml(2.9.3)来工作,其中包括libxml2.dll.a文件。最新版本中不存在此类文件,只有.lib文件。我找不到有关如何创建.dll.a文件的任何文档,或者为什么我的.lib文件不起作用。寻找一些指导。

用于创建.dll文件的命令从源:

cscript configure.js compiler=msvc prefix=c:\opt include=c:\opt\include lib=c:\opt\lib 
debug=yes iconv=no

nmake /f Makefile.msvc

编译错误:

未解决的外部符号xmlnewdoc在功能中引用 未解决的外部符号xmlfreedoc在函数中引用

I have built libxml2.dll with the latest 2.9.14 source. I was successful in creating the .dll and .lib files. I have linked the .lib file to my project, but when it comes to compile time, it doesn't seem to be able to resolve any of the libxml function calls I make in my program. It seems like the .lib file is incomplete.

I have gotten this to work in the past with an older version of libxml (2.9.3), that included a libxml2.dll.a file. No such file exists in the latest version, only a .lib file. I can't find any documentation on how to create the .dll.a file, or why my .lib file doesn't work. Looking for some guidance.

Commands used to create the .dll file from source:

cscript configure.js compiler=msvc prefix=c:\opt include=c:\opt\include lib=c:\opt\lib 
debug=yes iconv=no

nmake /f Makefile.msvc

Compile Errors:

unresolved external symbol xmlNewDoc referenced in function
unresolved external symbol xmlFreeDoc referenced in function

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

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

发布评论

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

评论(1

玩套路吗 2025-02-07 11:53:00

问题是我以32位的构建,用于64位应用。一旦基于本机X64编译器开发,它就起作用了。

The problem was I was building as 32 bit for a 64 bit application. Once building on native x64 compiler development, it worked.

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