Ubuntu C++ app - What libs to use

30 views
Skip to first unread message

Jason Josephy

unread,
May 12, 2015, 7:27:40 PM5/12/15
to v8-u...@googlegroups.com
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 

Louis Santillan

unread,
May 12, 2015, 8:15:10 PM5/12/15
to v8-u...@googlegroups.com
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
> --
> --
> v8-users mailing list
> v8-u...@googlegroups.com
> 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 v8-users+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages