VC8下使用Google chrome浏览器的javascript脚本引擎v8的问题
各位大侠,请问有人使用过 v8 么,我在VC8下调用总是报错
错误如下:
>正在编译...
1>Test.cpp
1>TestDlg.cpp
1>e:\Test\Test\v8\v8.h(424) : error C2059: 语法错误 : “字符串”
1>e:\Test\Test\v8\v8.h(424) : error C2091: 函数返回函数
1>e:\Test\Test\v8\v8.h(424) : error C2802: 静态成员“operator new”没有形参
点上面的错误,会转到 v8.h 里面是这几行
HandleScope(const HandleScope&);
void operator=(const HandleScope&);
void* operator new(size_t size);//424行 会转到这一行
void operator delete(void*, size_t);
程序执行的部分如下:
void CTestDlg::OnBnClickedButton2()
{
HandleScope handle_scope;
Handle<Context> context = Context::New();
Context::Scope context_scope(context);
Handle<String> source = String::New("'Hello' + ', World!'");
Handle<Script> script = Script::Compile(source);
Handle<Value> result = script->Run();
String::AsciiValue ascii(result);
AfxMessageBox(CString(*ascii));
}
在google,baidu上搜索了半天,就是没有相关的资料,v8的资料太少了
有哪位大侠使用过的,告诉我使用的方法,不胜感激