简体   繁体   English

使用gyp的V8的Hello World示例

[英]Hello World example for V8 using gyp

Since SCons has been deprecated. 由于SCons已被弃用。 I used the gyp to generate vs solution. 我使用gyp生成vs解决方案。 I did what they told me on the build BuildingWithGYP . 我做了他们在构建BuildingWithGYP上告诉我的事情。 And the v8 project builded ok! v8项目建成了! and I got the v8_base.lib but no v8.lib. 我得到了v8_base.lib但没有v8.lib。

And in the hello world project , get started .I add the lib directory into the add library. 在hello world项目中, 开始吧 。我将lib目录添加到add库中。 But it linked failed: 但它链接失败:

Linking... 链接...

1>v8test.obj : error LNK2019: unresolved external symbol "public: 
__thiscall v8::HandleScope::~HandleScope(void)" (?? 
1HandleScope@v8@@QAE@XZ) referenced in function _main 
1>v8test.obj : error LNK2019: unresolved external symbol "public: 
__thiscall v8::String::AsciiValue::~AsciiValue(void)" (?? 
1AsciiValue@String@v8@@QAE@XZ) referenced in function _main 
1>v8test.obj : error LNK2019: unresolved external symbol "public: 
__thiscall v8::String::AsciiValue::AsciiValue(class v8::Handle<class 
v8::Value>)" (??0AsciiValue@String@v8@@QAE@V?$Handle@VValue@v8@@@2@@Z) 
referenced in function _main 
1>v8test.obj : error LNK2019: unresolved external symbol "public: 
class v8::Local<class v8::Value> __thiscall v8::Script::Run(void)" (? 
Run@Script@v8@@QAE?AV?$Local@VValue@v8@@@2@XZ) referenced in function 
_main 
……

It seems that couldn't find the implement but i used the dumpbin tool and find the symbol i can find them in the v8_base.lib 似乎无法找到工具但我使用了dumpbin工具并找到了我可以在v8_base.lib中找到它们的符号

I am sure that the library directory is ok! 我确定库目录没问题! but i don't know why it couldn't find the implement. 但我不知道为什么它找不到工具。

您可以添加lib“v8_base.lib”作为解决问题的附加依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM