Adding a parameter to your scons command should create a mingw makefile, and if V8 builds on *nix it should build in mingw at that point I would think.
On Fri, Sep 19, 2008 at 4:17 AM, Søren Gjesse <[EMAIL PROTECTED]> wrote: > As described in the documentation the only toolchains supported on Windows > are Visual Studio 2005, Visual Studio 2008 and Visual C++ 2008 Express. We > have issue 64 (http://code.google.com/p/v8/issues/detail?id=64) open as a > feature request to add support for more toolchains on Windows. > Regards, > Søren > > On Fri, Sep 19, 2008 at 12:07 PM, sloisel <[EMAIL PROTECTED]> wrote: >> >> Thanks Søren and Kasper, >> >> All right, now I understand. I guess my knowledge of Windows is pretty >> limited. >> >> I'm still having trouble linking, but I think that's because I'm >> trying to compile my program with MinGW's g++, and the g++ name >> mangling is not the same as the VC name mangling. Am I right? >> >> g++ -LD:\Program Files\pythonxy\python\libs -LD:\cygwin\home\Seb\v8- >> read-only -shared -oondrej.pyd ondrej.o -lpython25 -lv8 >> ondrej.o: In function >> >> `ZNSt8_Rb_treeISsSt4pairIKSsiESt10_Select1stIS2_ESt4lessISsESaIS2_EE13insert_uniqueESt17_Rb_tree_iteratorIS2_ERKS2_': >> D:/Program Files/pythonxy/mingw/bin/../lib/gcc/ >> mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_tree.h:(.text >> +0x85): undefined reference to >> >> `_imp___ZN2v87Context3NewEPNS_22ExtensionConfigurationENS_6HandleINS_14ObjectTemplateEEENS3_INS_5ValueEEE' >> [etc...] >> >> If it's because of the g++/VC impedence mismatch, I'll switch >> compilers as appropriate. But just per curiosity, is there a way to >> build with the MinGW that I have on Windows? >> >> Thanks again for the quick help. >> >> Cheers, >> >> Sébastien Loisel >> >> On Sep 19, 5:34 am, "Søren Gjesse" <[EMAIL PROTECTED]> wrote: >> > The wiki pagehttp://code.google.com/p/v8/wiki/BuildingOnWindowshave been >> > updated with the section "Building the hello_world sample on Windows". >> > Regards, >> > Søren >> > >> > On Fri, Sep 19, 2008 at 11:09 AM, Søren Gjesse <[EMAIL PROTECTED]> >> > wrote: >> > > As you are building on Windows the V8 library is in the file v8.lib - >> > > not >> > > libv8.a. The default build will produce a static library in v8.lib >> > > (v8.lib >> > > is rather large). Adding the option library=shared to the SCons build >> > > will >> > > produce a shared library, on Windows this is in v8.lib and v8.dll >> > > (v8.lib is >> > > much smaller here referring to v8.dll). >> > >> > > To build the hello_world.cpp sample on Windows open the Visual Studio >> > > 2008 >> > > Command Prompt, change the directory to where V8 is checked out (and >> > > v8.lib >> > > is located), place hello_world.cpp there and run >> > > cl /Iinclude hello_world.cpp v8.lib >> > >> > > this produces hello_world.exe ready to run. >> > >> > > If using a shared library use the following command to compile >> > >> > > cl /Iinclude /DUSING_V8_SHARED hello_world.cpp v8.lib >> > >> > > Now you just have to make sure that v8.dll can be found on the path or >> > > in >> > > the current directory as hello_world.exe will depend on it as running >> > >> > > depends hello_world.exe >> > >> > > will show. >> > >> > > I will add the information on building hello_world.cpp on Windows to >> > > the >> > > wiki page. >> > >> > > Regards, >> > > Søren >> > >> > > On Fri, Sep 19, 2008 at 10:49 AM, sloisel <[EMAIL PROTECTED]> wrote: >> > >> > >> Dear Kasper, >> > >> > >> Thank you for your quick reply. >> > >> > >> > If you follow the build instructions onhttp:// >> > >> code.google.com/apis/v8/build.html, the V8 library (libv8.a) >> > >> > should end up in the directory where you invoked scons. >> > >> > >> I did, and I think maybe on my other machine it might have worked >> > >> (I'll check tomorrow), but I tried again on this machine and I'm >> > >> having problems. Here's what I'm doing. >> > >> > >> First, I open a cygwin window to check out the svn code. That's >> > >> because I only have the svn that comes with cygwin. >> > >> > >> [EMAIL PROTECTED] ~ >> > >> $ svn --version >> > >> svn, version 1.4.5 (r25188) >> > >> compiled Sep 19 2007, 23:10:31 >> > >> > >> Copyright (C) 2000-2006 CollabNet. >> > >> Subversion is open source software, seehttp://subversion.tigris.org/ >> > >> This product includes software developed by CollabNet (http:// >> > >>www.Collab.Net/). >> > >> [...] >> > >> > >> [EMAIL PROTECTED] ~ >> > >> $ svn checkouthttp://v8.googlecode.com/svn/trunk/v8-read-only > svn- >> > >> v8 2>&1 >> > >> > >> I verify the svn-v8 file, and I find: >> > >> > >> A v8-read-only/test >> > >> A v8-read-only/test/cctest >> > >> A v8-read-only/test/cctest/test-spaces.cc >> > >> A v8-read-only/test/cctest/test-mark-compact.cc >> > >> A v8-read-only/test/cctest/test-platform-linux.cc >> > >> [...] >> > >> A v8-read-only/benchmarks/crypto.js >> > >> A v8-read-only/benchmarks/deltablue.js >> > >> A v8-read-only/benchmarks/v8-logo.png >> > >> Checked out revision 344. >> > >> > >> So, that worked. >> > >> > >> Next, I open a fresh new cmd.exe window. I don't use the cygwin >> > >> window, because cygwin comes with a python, and that's not the same >> > >> python that scons installed to. So, continuing with >> > >>http://code.google.com/apis/v8/build.html, >> > >> > >> D:\cygwin\home\Seb>python -V >> > >> Python 2.5.2 >> > >> D:\cygwin\home\Seb>scons --version >> > >> SCons by Steven Knight et al.: >> > >> engine: v1.0.1.d20080915.r3424, 2008/09/15 11:22:20, by scons >> > >> on scons-d >> > >> ev >> > >> Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The >> > >> SCons >> > >> Foundatio >> > >> n >> > >> > >> OK, so far so good. Now I can build. I have VS 2008, so I look at >> > >>http://code.google.com/p/v8/wiki/BuildingOnWindowsand copy the >> > >> relevant line, except that I change the drive name to d:\, because >> > >> that's my drive. >> > >> > >> D:\cygwin\home\Seb>cd v8-read-only >> > >> > >> D:\cygwin\home\Seb\v8-read-only>scons env="PATH:d:\Program Files >> > >> \Microsoft Visua >> > >> l Studio 9.0\VC\bin;d:\Program Files\Microsoft Visual Studio >> > >> 9.0\Common7\IDE;d:\ >> > >> Program Files\Microsoft Visual Studio 9.0\Common7\Tools,INCLUDE:d: >> > >> \Program Files >> > >> \Microsoft Visual Studio 9.0\VC\include;d:\Program Files\Microsoft >> > >> SDKs >> > >> \Windows\ >> > >> v6.0A\Include,LIB:d:\Program Files\Microsoft Visual Studio 9.0\VC >> > >> \lib;d:\Program >> > >> Files\Microsoft SDKs\Windows\v6.0A\Lib" > build.txt >> > >> > >> The output is: >> > >> > >> scons: Reading SConscript files ... >> > >> scons: done reading SConscript files. >> > >> scons: Building targets ... >> > >> cl /Foobj\release\third_party\jscre\pcre_compile.obj /c >> > >> src\third_party >> > >> \jscre\pc >> > >> re_compile.cpp /nologo /W3 /WX /wd4355 /wd4800 /Ox /MT /Ob2 /Oi /Oy / >> > >> GR- /Gy /no >> > >> logo /W3 /WX /wd4355 /wd4800 /Ox /MT /Ob2 /Oi /Oy / >> > >> DENABLE_LOGGING_AND_PROFILING >> > >> /DWIN32 /D_USE_32BIT_TIME_T /DPCRE_STATIC /DSUPPORT_UTF8 / >> > >> DNO_RECURSE /DSUPPORT >> > >> _UCP /Zi >> > >> pcre_compile.cpp >> > >> cl /Foobj\release\third_party\jscre\pcre_exec.obj /c src\third_party >> > >> \jscre\pcre_ >> > >> exec.cpp /nologo /W3 /WX /wd4355 /wd4800 /Ox /MT /Ob2 /Oi /Oy /GR- / >> > >> Gy /nologo / >> > >> W3 /WX /wd4355 /wd4800 /Ox /MT /Ob2 /Oi /Oy / >> > >> DENABLE_LOGGING_AND_PROFILING /DWIN >> > >> 32 /D_USE_32BIT_TIME_T /DPCRE_STATIC /DSUPPORT_UTF8 /DNO_RECURSE / >> > >> DSUPPORT_UCP / >> > >> Zi >> > >> pcre_exec.cpp >> > >> [etc...] >> > >> cl /Foobj\release\snapshot-empty.obj /c src\snapshot-empty.cc /nologo >> > >> / >> > >> W3 /WX /w >> > >> d4355 /wd4800 /Ox /MT /Ob2 /Oi /Oy /GR- /Gy /nologo /W3 /WX /wd4355 / >> > >> wd4800 /Ox >> > >> /MT /Ob2 /Oi /Oy /DENABLE_LOGGING_AND_PROFILING /DWIN32 / >> > >> D_USE_32BIT_TIME_T /DPC >> > >> RE_STATIC /Zi >> > >> snapshot-empty.cc >> > >> lib /NOLOGO /OUT:v8.lib >> > >> obj\release\third_party\jscre\pcre_compile.obj >> > >> obj\relea >> > >> se\third_party\jscre\pcre_exec.obj obj\release\third_party\jscre >> > >> \pcre_tables.obj >> > >> obj\release\third_party\jscre\pcre_ucp_searchfuncs.obj obj\release >> > >> \third_party\ >> > >> jscre\pcre_xclass.obj obj\release\dtoa-config.obj obj\release >> > >> \accessors.obj obj\ >> > >> release\allocation.obj obj\release\api.obj obj\release\assembler- >> > >> ia32.obj obj\re >> > >> lease\assembler.obj obj\release\ast.obj obj\release\bootstrapper.obj >> > >> obj\release >> > >> \builtins-ia32.obj obj\release\builtins.obj obj\release\checks.obj >> > >> obj >> > >> \release\c >> > >> ode-stubs.obj obj\release\codegen-ia32.obj obj\release\codegen.obj >> > >> obj >> > >> \release\c >> > >> ompilation-cache.obj obj\release\compiler.obj >> > >> obj\release\contexts.obj >> > >> obj\relea >> > >> se\conversions.obj obj\release\counters.obj obj\release\cpu-ia32.obj >> > >> obj\release >> > >> \dateparser.obj obj\release\debug.obj obj\release\disasm-ia32.obj obj >> > >> \release\di >> > >> sassembler.obj obj\release\execution.obj obj\release\factory.obj obj >> > >> \release\fla >> > >> gs.obj obj\release\frames-ia32.obj obj\release\frames.obj obj\release >> > >> \global-han >> > >> dles.obj obj\release\handles.obj obj\release\hashmap.obj obj\release >> > >> \heap.obj ob >> > >> j\release\ic-ia32.obj obj\release\ic.obj obj\release\jsregexp.obj obj >> > >> \release\lo >> > >> g.obj obj\release\macro-assembler-ia32.obj obj\release\mark- >> > >> compact.obj obj\rele >> > >> ase\messages.obj obj\release\objects.obj obj\release\parser.obj obj >> > >> \release\plat >> > >> form-win32.obj obj\release\property.obj obj\release\rewriter.obj obj >> > >> \release\run >> > >> time.obj obj\release\scanner.obj obj\release\scopeinfo.obj >> > >> obj\release >> > >> \scopes.ob >> > >> j obj\release\serialize.obj obj\release\snapshot-common.obj >> > >> obj\release >> > >> \spaces.o >> > >> bj obj\release\string-stream.obj obj\release\stub-cache-ia32.obj obj >> > >> \release\stu >> > >> b-cache.obj obj\release\token.obj obj\release\top.obj obj\release >> > >> \unicode.obj ob >> > >> j\release\usage-analyzer.obj obj\release\utils.obj obj\release\v8- >> > >> counters.obj o >> > >> bj\release\v8.obj obj\release\v8threads.obj obj\release\variables.obj >> > >> obj\releas >> > >> e\zone.obj obj\release\libraries.obj obj\release\snapshot-empty.obj >> > >> scons: done building targets. >> > >> > >> Now I look for libv8.a: >> > >> > >> [EMAIL PROTECTED] ~/v8-read-only >> > >> $ find . | grep -i libv8 >> > >> > >> [EMAIL PROTECTED] ~/v8-read-only >> > >> $ >> > >> > >> Where did it go?!? I have v8.lib, but not libv8.a. >> > >> > >> Cheers, >> > >> > >> Sébastien Loisel >> > >> > >> On Sep 19, 1:28 am, "Kasper Lund" <[EMAIL PROTECTED]> wrote: >> > >> > Sébastien, >> > >> > >> > If you follow the build instructions onhttp:// >> > >> code.google.com/apis/v8/build.html, the V8 library (libv8.a) >> > >> > should end up in the directory where you invoked scons. >> > >> > >> > From the documentation page: "The simplest way to build V8 is to >> > >> > enter >> > >> > the directory into which you have checked out the V8 source and >> > >> > type >> > >> > scons, with no arguments. The build script will attempt to guess >> > >> > which >> > >> > platform you're building for and will then build the optimized >> > >> > version >> > >> > of V8 as a library in the current directory." >> > >> > >> > Cheers, >> > >> > Kasper >> > >> > >> > On Fri, Sep 19, 2008 at 12:08 AM, sloisel <[EMAIL PROTECTED]> >> > >> > wrote: >> > >> > >> > > Hello, >> > >> > >> > > I'm building a little toy thing with Python and Google V8. My >> > >> > > version >> > >> > > of python is python(x,y), and it's great because it comes with >> > >> > > this >> > >> > > huge amount of libraries, and with eclipse, as well as a compiler >> > >> > > (mingw) and etc... >> > >> > >> > > I've successfully built v8 using scons. I can compile my c++ >> > >> > > program, >> > >> > > but I can't link. Maybe it's because the gcc linker isn't as >> > >> > > smart as >> > >> > > the VC linker, but where's the v8 dll or .a file? If it's not >> > >> > > build >> > >> > > normally, how would I build it from the tree that I already have? >> > >> > >> > > Thanks, >> > >> > >> > > Sébastien Loisel >> > > > > > --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---