我正在尝试将v8引擎嵌入到我的C++应用程序中。我使用的是Visual C++ 2010。我已经成功地使用以下命令构建了它:
scons env="INCLUDE:C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include;C:\Program Files\Microsoft Visual Studio 10.0\VC\include,LIB:C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\lib"
然后,我:
将v8/include目录添加到“配置属性” -> “C/C++” -> “常规” --> “附加包含目录”中。
将v8/v8.lib文件添加到“配置属性” -> “链接器” -> “输入” -> “附加依赖项”中。
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__accept@12
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__listen@8
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__send@16
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__closesocket@4
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__freeaddrinfo@4
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__timeGetTime@0
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__socket@12
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__bind@12
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__recv@16
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__setsockopt@20
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__shutdown@8
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__ntohs@4
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__htons@4
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__getaddrinfo@16
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__htonl@4
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__ntohl@4
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__WSAStartup@8
1>v8.lib(platform-win32.obj) : error LNK2001: unresolved external symbol __imp__connect@12
有什么想法可以解决这个问题吗?
谢谢。
WINMM.LIB
也是如此。谢谢! - Alon Gubkin