Windows 上的 V8 JavaScript 引擎 (MinGW)
V8 JavaScript 引擎的构建说明仅提及 Visual Studio 2005 和 2008。有人在 Windows XP/Vista 上成功使用 MinGW 吗?
The build instructions of V8 JavaScript Engine mention only Visual Studio 2005 and 2008. Has anybody been successful with MinGW on Windows XP/Vista?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
你只需要稍微改变一下Scons。
查看 C:\YourPythonFolder\Lib\site-packages\scons-YourSconsVersion\SCons\Script__ init__.py 并转到第 560 行。
将链接器更改为 gnulink,将 c 编译器更改为 mingw,将 c++ 编译器更改为 g++。
最终它应该看起来像这样:
现在默认激活 MingW :)
You just need to change Scons a bit.
Take a look at C:\YourPythonFolder\Lib\site-packages\scons-YourSconsVersion\SCons\Script__ init__.py and go to line 560.
Change the linker to gnulink, the c compiler to mingw and the c++ compiler to g++.
Eventually it should look like this:
Now MingW is activated by default :)
MinGW 支持有一个补丁: http://codereview.chromium.org/18309
另请参阅:
http://code.google.com/p/v8/issues/详情?id=64
There is a patch for MinGW support: http://codereview.chromium.org/18309
See also:
http://code.google.com/p/v8/issues/detail?id=64
我已经尝试过了,但似乎它会自动检测WIN32平台并尝试调用 vc++ 编译器,我尝试将 mingw-gcc 编译器(我没有安装 vc++)添加到 PATH 中,并且构建脚本正确地看到了它,但是不能开箱即用地编译。
我想删除“WIN32标志”就可以了,因为为了在mingw下成功编译,编译器需要认为是在unix环境上,但即使编译成功,由于平台不同,它也可能会出现一些问题。
I've tried, but seems it automatically detect the WIN32 platform and tries to invoke the vc++ compiler, I tried to adding to the PATH the mingw-gcc compiler (I've not vc++ installed) and the build script correctly sees it, but doesn't compile out of the box.
I suppose deleting the "WIN32 flag" will do the work, since for successfully compiling under mingw the compiler needs to thinks to be on unix enviroment, but then even if it compiles probably it will have some problems due to the different platform.
V8 似乎针对不同平台使用其代码的不同部分(特别是文件系统内容)。
我在 Cygwin 下进行了构建,它提供了一个漂亮的 linux 库,它可以在 linux 上运行,但不能在 Win 上运行。 我认为如果你删除 WIN32 标志,这将与 MinGW 部分相同!
目前我只能看到两种可能性。 第一个很简单:使用 Visual Studio,它是免费的。
第二个非常难:编写一个 makefile :)
V8 seems to use different parts of its code (especialy for the file system stuff) for different platforms.
I made a build under Cygwin which puts out a beautiful linux lib, which runs on linux but doesn't on Win. I think partwise this will be the same with MinGW if you erase the WIN32 flag!
At the moment I just can see 2 possibilities. One is simple: Use Visual Studio, it's free.
The second is very hard: write a makefile :)