使用 winsock 的 v8 发布模式链接器错误 [英] v8 release mode linker error with winsock
问题描述
在我接受了上一个问题的答案后,这个主题变成了一个副主题,所以为了简洁起见,我将它作为一个单独的主题放在这里,我相信这会对其他人更有用.
This subject became a side subject after I accepted an answer for my last question, so I will put it here as a separate topic for neatness, and I believe this will make it more useful for others.
我正在开发 MS Visual Studio 2005.
I am working on MS visual studio 2005.
我在发布模式下使用 v8 构建项目,并且收到与 winsock 相关的链接器错误,即使 winsock 库已经在我的附加依赖项中.
I am building a project using v8 in release mode, and am receiving a linker error that is related to winsock even though the winsock libraries are already in my additional dependencies.
我的附加依赖项列表对于发布和调试模式是相同的.它在调试模式下运行良好,而我仅在发布模式下才会收到链接器错误.
My additional dependencies list is the same for both release and debug mode. It works perfectly in debug mode, and I am getting the linker errors only in release mode.
这是我的附加依赖项字符串:
here is my additional dependencies string:
Ws2_32.lib wininet.lib rasapi32.lib iphlpapi.lib Psapi.lib winmm.lib wsock32.lib msvcrt.lib $(SolutionDir)\external_libs\debug\v8.lib $(SolutionDir)external_libs\release\v8_base.lib $(SolutionDir)external_libs\release\v8_snapshot.lib
非常感谢任何可能的帮助.
Thanks a lot for any possible help.
更新:
我将依赖减少到:
Ws2_32.lib Psapi.lib winmm.lib msvcrt.lib $(SolutionDir)\external_libs\release\v8.lib $(SolutionDir)external_libs\release\v8_base.lib
仍然得到未解析的外部:
and still get unresolved externals:
1>v8_base.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__freeaddrinfo@4
1>v8_base.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__getaddrinfo@16
1>v8_base.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __set_abort_behavior
推荐答案
您的依赖项列表中有 debug 和 release 文件夹的路径.尝试用 $(Configuration)
替换它们.
You have paths to both debug and release folders in your dependency list. Try replacing those with $(Configuration)
.
这篇关于使用 winsock 的 v8 发布模式链接器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!