title: V8 "Hello World" Example - Compiling on Ubuntu 13.10 - tons of undefined reference errors "icu_46"
body: <p>I am trying to follow the basic "hello world" example for Google's V8 as found <a href="https://developers.google.com/v8/get_started" rel="nofollow">here</a>.  I'm on Ubuntu 13.10, gcc version 4.8.1; this should be straighforward, no? </p>
  
  <p>After building v8 itself and creating the hello world .cpp file, 
  I run (exactly** as Google suggests)</p>
  
  <p>** <em>Update:  Okay, per my comments on the accepted answer below, I unwittingly wasn't running it exactly as Google suggests, because I thought the braces in the file name were an instruction to the reader to choose one option, not a 
  <a href="http://www.gnu.org/software/bash/manual/bashref.html#Brace-Expansion" rel="nofollow">syntax that g++ would understand</a>.  Nontheless, it still doesn't work except with the additions suggested in the answer below</em></p>
  
  <pre><code>   g++ -Iinclude helloworld.cpp -o hello_world out/x64.debug/obj.target/tools/gyp/libv8_base.x64.a -lpthread
  </code></pre>
  
  <p>And get bombarded with compile errors.  There are too many to print here, but nearly all the errors are of the form:</p>
  
  <pre><code>   undefined reference to 'icu_46 ...'
  </code></pre>
  
  <p>for example (some sample lines)</p>
  
  <pre><code>   /home/ray/Playground/v8/out/../src/i18n.cc:138: undefined reference to `icu_46::UnicodeString::~UnicodeString()'
     /home/ray/Playground/v8/out/../src/i18n.cc:125: undefined reference to `icu_46::UnicodeString::~UnicodeString()'
     /home/ray/Playground/v8/out/../src/i18n.cc:147: undefined reference to `icu_46::UnicodeString::~UnicodeString()'
  </code></pre>
  
  <p>After much Googling I can figure out this has something to do with something called ICU (see <a href="http://userguide.icu-project.org/howtouseicu" rel="nofollow">http://userguide.icu-project.org/howtouseicu</a>) but why I'm getting the error, and what I can do about it, I don't know.</p>
  
  <p>While the majority of errors are icu_46 related, there are some like this as well, from the 'bootstrapper.o':</p>
  
  <pre><code>     /home/ray/Playground/v8/out/x64.debug/obj.target/v8_base.x64/src/bootstrapper.o: In function `v8::internal::Bootstrapper::NativesSourceLookup(int)':
       /home/ray/Playground/v8/out/../src/bootstrapper.cc:77: undefined reference to `v8::internal::NativesCollection&lt;(v8::internal::NativeType)0&gt;::GetBuiltinsCount()'
       /home/ray/Playground/v8/out/../src/bootstrapper.cc:81: undefined reference to `v8::internal::NativesCollection&lt;(v8::internal::NativeType)0&gt;::GetRawScriptSource(int)'
       /home/ray/Playground/v8/out/x64.debug/obj.target/v8_base.x64/src/bootstrapper.o: In function `v8::internal::Genesis::CompileBuiltin(v8::internal::Isolate*, int)':
       /home/ray/Playground/v8/out/../src/bootstrapper.cc:1448: undefined reference to `v8::internal::NativesCollection&lt;(v8::internal::NativeType)0&gt;::GetScriptName(int)'
  </code></pre>
  
  <p>I'm Googled endlessly on this and have found signs that other people have run into the issue but no solutions.  Any help will be hugely appreciated.  Thank you. </p>