Hi,

I've been trying to build the hello world example with a shared
library, and haven't been having any luck (using the static lib was no
problem). I noticed a similar thread for windows, and tried adding -
DUSING_V8_SHARED to my options with no success.

I've tried:

   g++ -Iinclude hello_world.cpp -o hello_world -L./ -lv8 -lpthread

     and

   g++ -Iinclude hello_world.cpp -DUSING_V8_SHARED -o hello_world -L./
-lv8 -lpthread

Both complain about undefined symbols for everything V8 related. I
also tried rebuilding the dylib with toolchain=gcc, but no luck with
that either.

I'm running out of ideas, so help would be appreciated.

Thanks.

For reference, the errors look like this:

Undefined symbols:
  "v8::Script::Compile(v8::Handle<v8::String>, v8::ScriptOrigin*,
v8::ScriptData*)", referenced from:
      _main in cc0sqKe3.o
  "v8::Context::Enter()", referenced from:
      v8::Context::Scope::Scope(v8::Handle<v8::Context>)in cc0sqKe3.o
  "v8::String::AsciiValue::AsciiValue(v8::Handle<v8::Value>)",
referenced from:
      _main in cc0sqKe3.o
  "v8::String::AsciiValue::~AsciiValue()", referenced from:
      _main in cc0sqKe3.o
  "v8::Script::Run()", referenced from:
      _main in cc0sqKe3.o
  "v8::Context::Exit()", referenced from:
      v8::Context::Scope::~Scope()in cc0sqKe3.o
  "v8::HandleScope::~HandleScope()", referenced from:
      _main in cc0sqKe3.o
      _main in cc0sqKe3.o
  "v8::String::New(char const*, int)", referenced from:
      _main in cc0sqKe3.o
  "v8::V8::DisposeGlobal(v8::internal::Object**)", referenced from:
      v8::Persistent<v8::Context>::Dispose()      in cc0sqKe3.o
  "v8::HandleScope::HandleScope()", referenced from:
      _main in cc0sqKe3.o
  "v8::Context::New(v8::ExtensionConfiguration*,
v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::Value>)", referenced
from:
      _main in cc0sqKe3.o

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to