8

Is it possible to build googles v8 as a shared library with gyp on windows (msvc 2012)? Everything I tried doesn't work. What I've tried:

python build\gyp_v8 -Dcomponent=shared_library
python build\gyp_v8 library=shared

The second one gives an error that "library" is unknown. The first one does not have any effect.

The Wavelength
  • 2,586
  • 2
  • 18
  • 38
  • http://stackoverflow.com/questions/5953413/how-to-actually-build-v8-on-windows –  Feb 16 '13 at 23:46
  • SCons is outdated... Also, this does not affect my problem. – The Wavelength Feb 16 '13 at 23:59
  • AS far as I can see with gyp it is better to use Cygwin but no matter. I see the way to do the option for the shared library is to tweak the GYP_DEFINES variable and not supply it as a command line parameter. From here http://code.google.com/p/v8/wiki/BuildingWithGYP Seems to indicate a section called custom build settings and that indicates that it goes via the envvar and not the command line parameter as you indicate. –  Feb 17 '13 at 01:21
  • Thanks. I've tried: _python build\gyp_v8 -GYP_DEFINES=shared_ and _python build\gyp_v8 -GYP_DEFINES=shared_library_ but it does not work either. – The Wavelength Feb 17 '13 at 15:03
  • No,I mean set the environment variable GYP_DEFINES. Not the command line parameter. –  Feb 17 '13 at 23:51
  • That does not work too :/ Any further ideas? – The Wavelength Feb 25 '13 at 20:47

1 Answers1

9

This works in a project I'm using:

python build\gyp_v8 -Dtarget_arch=ia32 -Dcomponent=shared_library
msbuild /p:Configuration=Release /p:Platform=Win32 tools\gyp\v8.sln
BitCortex
  • 2,908
  • 1
  • 13
  • 18