Search code examples
c++windowscompilationv8

compiling v8 on windows


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?


Solution

  • 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.