在windows上编译v8
当我尝试像这样编译时,
cl /Iinclude hello_world.cpp v8.lib
我收到此错误
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
,当我尝试像这样编译时,
cl /Iinclude v8.lib Winmm.lib WSock32.lib hello_world.cpp ws2_32.lib
我收到此错误,
LINK : fatal error LNK1181: cannot open input file 'Winmm.lib'
如何解决此问题?
When I am trying to compile like this
cl /Iinclude hello_world.cpp v8.lib
I get this error
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
and when I am trying to do it like this
cl /Iinclude v8.lib Winmm.lib WSock32.lib hello_world.cpp ws2_32.lib
I am getting this error
LINK : fatal error LNK1181: cannot open input file 'Winmm.lib'
how to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编译器/链接器找不到 Windows lib 文件。有很多方法可以解决这个问题。例如,您可以将 lib 文件位置的路径添加到
LIB
环境变量中。或者您可以将/LIBPATH
选项传递给链接器。最后,看起来你在这里编译的不是V8。看起来您只是试图链接到已经编译的 V8 库。
The compiler/linker can't find the Windows lib files. There are lots of ways to resolve this. For example, you can add the paths to the locations of the lib files to the
LIB
environment variable. Or you can pass the/LIBPATH
option to the linker.Finally, it doesn't look like you are compiling V8 here. It would appear that you are just trying to link to the V8 library that has already been compiled.