链接到libxml2.lib文件的Windows,但找不到外部符号
我已经用最新的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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是我以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.