Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用V8作为后端启动时遇到问题 #13

Closed
yqs112358 opened this issue Apr 14, 2021 · 2 comments
Closed

用V8作为后端启动时遇到问题 #13

yqs112358 opened this issue Apr 14, 2021 · 2 comments

Comments

@yqs112358
Copy link

yqs112358 commented Apr 14, 2021

问题描述:把小游戏demo单独提取出来,选择V8为backend,把test自动从github拉取的那个作者编译好的v8提取出来,加入项目并链接。接下来启动demo的时候报错
#
# Fatal error in , line 0
# Failed to deserialize the V8 snapshot blob. This can mean that the snapshot blob file is corrupted or missing.
#
#
#
#FailureMessage Object: 0000005F167AF088
看起来像是V8快照加载失败
不知该如何解决
另外问一下v8该如何编译才能符合作为scriptx后端的要求

@LanderlYoung
Copy link
Collaborator

这个是你使用v8的问题,其实和ScriptX还没多大关系,你可以参考

v8::V8::InitializeExternalStartupData(argv[0]);

如果你的v8使用external的snapshot数据,需要你自己初始化一下v8。

@yqs112358
Copy link
Author

确实 加了v8::V8::InitializeExternalStartupData(".");就行了
感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants