-1
最近、Google v8のサンプルのhello worldプログラムをビルドして実行しようとしています。 私のxcodeバージョンは4.0.2GA、x86_64です。問題V8エンジンのMac Pro X86_64でサンプルを実行していますか?
ガイドのリンク:get Started
しかし、コマンドを実行します。 G ++ -Iinclude hello_world.cpp -o hello_world libv8.a -lpthread
のエラーが表示さ:
ld: warning: ignoring file libv8.a, file was built for archive which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
"v8::Context::Enter()", referenced from:
v8::Context::Scope::Scope(v8::Handle<v8::Context>)in ccJsmYlc.o
"v8::V8::DisposeGlobal(v8::internal::Object**)", referenced from:
v8::Persistent<v8::Context>::Dispose() in ccJsmYlc.o
"v8::Context::Exit()", referenced from:
v8::Context::Scope::~Scope()in ccJsmYlc.o
"v8::HandleScope::HandleScope()", referenced from:
_main in ccJsmYlc.o
"v8::Context::New(v8::ExtensionConfiguration*, v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::Value>)", referenced from:
_main in ccJsmYlc.o
"v8::String::New(char const*, int)", referenced from:
_main in ccJsmYlc.o
"v8::Script::Compile(v8::Handle<v8::String>, v8::ScriptOrigin*, v8::ScriptData*, v8::Handle<v8::String>)", referenced from:
_main in ccJsmYlc.o
"v8::Script::Run()", referenced from:
_main in ccJsmYlc.o
"v8::String::AsciiValue::AsciiValue(v8::Handle<v8::Value>)", referenced from:
_main in ccJsmYlc.o
"v8::String::AsciiValue::~AsciiValue()", referenced from:
_main in ccJsmYlc.o
"v8::HandleScope::~HandleScope()", referenced from:
_main in ccJsmYlc.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status.
私はデフォルトをa32にチェックし、次にscons arch = x64で再構築します。ありがとう! – kennyeric
よろしくお願いします。回答を受け入れる時間を取ってください - http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work – fvu