V8 用の hello world の例をコンパイルしようとしていますが、コンパイル時エラーが発生し続けます。コードは次のとおりです。
#include <v8/src/v8.h>
using namespace v8;
int main(int argc, char* argv[]) {
// Create a string holding the JavaScript source code.
String source = String::New("Hi");
// Compile it.
Script script = Script::Compile(source) ;
// Run it.
Value result = script->Run();
// Convert the result to an ASCII string and display it.
String::AsciiValue ascii(result) ;
printf("%s\n", *ascii) ;
return 0;
}
これはコンパイルエラーです:
error: conversion from ‘v8::Local<v8::String>’ to non-scalar type ‘v8::String’ requested
エラーは、8 行目で次のように表示されます。 String source = String::New("Hi");
私はこのエラーを無意味にグーグルで検索しようとしましたが、意味のある修正が見つからないようです。何か案は?
私は両方を試しました:
svn チェックアウトhttp://v8.googlecode.com/svn/trunk/ v8
と
svn チェックアウトhttp://v8.googlecode.com/svn/branches/bleeding_edge/ v8
両方で同じエラーが発生します。