gpt4 book ai didi

c++ - 使用 gyp 的 V8 的 Hello World 示例

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:24:16 28 4
gpt4 key购买 nike

由于 SCons 已被弃用。我使用 gyp 生成 vs 解决方案。我按照他们在构建时告诉我的做了 BuildingWithGYP .并且 v8 项目构建正常!我得到了 v8_base.lib 但没有 v8.lib。

在 hello world 项目中,get started .我将lib目录添加到添加库中。但链接失败:

正在链接...

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
……

好像找不到工具但我使用了 dumpbin 工具并找到了我可以在 v8_base.lib 中找到的符号

确定库目录没问题!但不知道为什么找不到工具。

最佳答案

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

关于c++ - 使用 gyp 的 V8 的 Hello World 示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8612075/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com