pmed / v8pp

Bind C++ functions and classes into V8 JavaScript engine
http://pmed.github.io/v8pp/
Other
890 stars 120 forks source link

Debug check failed: platform #103

Closed aj3423 closed 5 years ago

aj3423 commented 5 years ago

I downloaded the v8-v141-x86 package using NuGet, compiled v8pp with this "v8-v141-x86.7.3.492.21" prebuilt v8 header file. Then I create a simple test program

#include <v8pp/context.hpp>
int main() {
    v8pp::context context;
}

It's fine for compiling and linking, but error happens when running:

#
# Fatal error in .\../../../../../src/v8.cc, line 125
# Debug check failed: platform.
#
#
#
#FailureMessage Object: 012FF80C

My environment: Win10 pro 64-bit, vs2017 Community. How to fix it? Thanks.

pmed commented 5 years ago

Hi

You have to initialize V8 before usage, please refer V8 docs or v8pp test program

And do no forget to finalise V8 at the end of your program, like in v8pp test program does it