How to build v8 to work with this project?
How are you creating the v8 binaries? I tried pretty much every combination of common settings in the args.gn file:

But there are 2 problems:
- you have 4 v8_base_x.lib files for some reason, I only get a single v8_base.lib
- attempting to replace your libs with the new ones results in a large number of errors like
v8_base.lib(api.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in SharedPCH.UnrealEd.h.objwhen building the plugin.
Have you read this? Https://github.com/ncsoft/Unreal.js/wiki/V8 :)
Oh! That's for building with gyp though, v8 wants to build with this new gn thing now... I'll see if it has similar options
I tried using similar gn settings, but it's not successful so far. The setting v8_enable_inspector doesn't actually exist in gyp or gn.
is_debug = false
target_cpu = "x64"
v8_use_snapshot = false
v8_static_library = true
is_component_build = true
v8_enable_i18n_support = false
treat_warnings_as_errors = false
The lib is huge now! v8_base.lib is over 800MB... can't be right.
Still causes hundreds of errors also:

Next try:
is_debug = false
target_cpu = "x64"
v8_use_snapshot = false
v8_static_library = true
is_component_build = false
v8_enable_i18n_support = false
treat_warnings_as_errors = false
I also to v8/build/config/win/BUILD.gn and changed configs = [ ":static_crt" ] to configs = [ ":dynamic_crt" ] since the force_dynamic_crt setting doesn't exist anymore in gn.
The v8_base.lib is back to normal size now... 350MB
It also generated significantly less errors:
... but it still isn't working.
Is this the same problem? Https://bugs.chromium.org/p/v8/issues/detail?id=6461
I don't think it is, building v8 works fine. The problem only appears when trying to link it in your plugin.
I did not have a problem with gyp build. I will reply after I try to build with gn.
I think the version of v8 you built seems to be higher than 6.0. Version 6.0 or later requires additional v8_builtins_setup.lib and v8_builtins_generators.lib.
Oh. I've added these 2 libs for 6.0, but it's still not linking properly. Now the number of errors is down to 2 though:
2>Module.V8.cpp.obj : error LNK2019: unresolved external symbol "public: static class std::unique_ptr<class v8_inspector::V8Inspector,struct std::default_delete<class v8_inspector::V8Inspector> > __cdecl v8_inspector::V8Inspector::create(class v8::Isolate *,class v8_inspector::V8InspectorClient *)" (?create@V8Inspector@v8_inspector@@SA?AV?$unique_ptr@VV8Inspector@v8_inspector@@U?$default_delete@VV8Inspector@v8_inspector@@@std@@@std@@PEAVIsolate@v8@@PEAVV8InspectorClient@2@@Z) referenced in function "public: __cdecl FInspector::FInspector(class v8::Platform *,int,class v8::Local<class v8::Context>)" (??0FInspector@@QEAA@PEAVPlatform@v8@@HV?$Local@VContext@v8@@@2@@Z)
2>v8_libbase.lib(stack_trace_win.obj) : error LNK2019: unresolved external symbol __imp_PathRemoveFileSpecW referenced in function "bool __cdecl v8::base::debug::`anonymous namespace'::InitializeSymbols(void)" (?InitializeSymbols@?A0x76313174@debug@base@v8@@YA_NXZ)
How does your args.gn file look? Or did you change something else to make it work?
No. I found out that I was experiencing the same thing as your error when building v8 version 6.1 with GYP instead of GN. Assuming your error message, I think v8_enable_inspector is missing.
I searched the entire v8 folder for enable_inspector and the setting doesn't exist. Maybe it has been renamed.
There was no problem in building with GYP. If it is a GN build only problem, it is assumed that config is different.
Ok, it seems to work if I also copy over v8/out.gn/x64.release/obj/src/inspector/inspector.lib and add PublicAdditionalLibraries.Add("shlwapi.lib"); to V8.Build.cs.
Is there any advantage to building with GN then? I only wanted to use that because the v8 wiki says GYP is supposed to be deprecated and removed soon.
When I built V8, I did not know about building V8 with GN. If building V8 with GN works well, please update to GN build at https://github.com/ncsoft/Unreal.js/wiki/V8.
I build v8(Version 6.2) with gn. UnrealEngine crashes when loading "UnrealJS plugin"

Since version v8 (Version 6.2) is not officially released, there may be several internal problems. If the V8 API has changed or if it is necessary to implement it, I will add it later.
I build v8(Version 6.2) with gn. UnrealEngine crashes when loading "UnrealJS plugin"
![]()
@crocuis I have the same error. Now, have you resolved it?