The short answer follows: # assuming linux vs. windows/osx/etc. git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git export PATH=$PWD/depot_tools:$PATH fetch v8 # assuming gcc instead of clang # assuming x64/amd64/x86_64 vs i386/i686/ia32 # assuming no i18n cd v8 make GYPFLAGS="-Dclang=0" x64.release i18nsupport=off cd ../ g++ -I v8/ mycode.cpp -o mycode -Wl,--start-group v8/out/x64.release/obj.target/{tools/gyp/libv8_{base,libbase,snapshot,libplatform}}.a -Wl,--end-group -lrt -pthread ./mycode
The long answer is here [0][1][2][3]. [0] https://developers.google.com/v8/get_started [1] https://code.google.com/p/v8-wiki/wiki/UsingGit [2] http://www.chromium.org/developers/how-tos/install-depot-tools [3] https://code.google.com/p/v8-wiki/wiki/BuildingWithGYP On Tue, May 12, 2015 at 4:27 PM, Jason Josephy <[email protected]> wrote: > I am trying to use V8 directly in my c++ app, but i have no idea what libs > to link to. I have tried many different configurations and get all sorts of > different unresolved external errors, far to many to post here. So what is > the right incantation for linking? Any advice? > > thanks > > -- > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
