I am still unsure as to why I am getting this issue Ben.
error LNK2001: unresolved external symbol "public: static class
v8::Local<class v8::Context> __cdecl v8::Context::New(class v8::Isolate
*,class v8::ExtensionConfiguration *,class v8::MaybeLocal<class
v8::ObjectTemplate>,class v8::MaybeLocal<class v8::Value>)"
(?New@Context@v8@@SA?AV?$Local@VContext@v8@@@2@PEAVIsolate@2@PEAVExtensionConfiguration@2@V?$MaybeLocal@VObjectTemplate@v8@@@2@V?$MaybeLocal@VValue@v8@@@2@@Z)
The code in question would be
v8::Local<v8::Context> context = v8::Context::New(isolate);
The one from the samples is exactly the same
Isolate* isolate = Isolate::New(create_params);
{
Isolate::Scope isolate_scope(isolate);
// Create a stack-allocated handle scope.
HandleScope handle_scope(isolate);
// Create a new context.
*Local<Context> context = Context::New(isolate);*
// Enter the context for compiling and running the hello world script.
Context::Scope context_scope(context);
// Create a string containing the JavaScript source code.
Local<String> source =
String::NewFromUtf8(isolate, "'Hello' + ', World!'",
NewStringType::kNormal).ToLocalChecked();
// Compile the source code.
Local<Script> script = Script::Compile(context, source).ToLocalChecked
();
// Run the script to get the result.
Local<Value> result = script->Run(context).ToLocalChecked();
// Convert the result to an UTF8 string and print it.
String::Utf8Value utf8(result);
printf("%s\n", *utf8);
}
I have highlighted the line in the hello-world sample and i'm unsure how
that's just happily compiling/linking and mine is not.
On Wednesday, 21 September 2016 18:35:34 UTC+2, Pieter wrote:
>
> Thanks for the reply Ben,
> This is odd as this very same code compiles fine on OSX and Ubuntu with
> the same branch checked out?
>
> On Wednesday, 21 September 2016 18:21:21 UTC+2, Ben Noordhuis wrote:
>>
>> On Wed, Sep 21, 2016 at 2:47 PM, Pieter <[email protected]> wrote:
>> > After I have managed to get the windows build of v8 going I have a
>> single
>> > unresolved symbol issue that I could use some help with.
>> >
>> > unresolved external symbol "public: static class v8::Local<class
>> > v8::Context> __cdecl v8::Context::New(class v8::Isolate *,class
>> > v8::ExtensionConfiguration *,class v8::MaybeLocal<class
>> > v8::ObjectTemplate>,class v8::MaybeLocal<class v8::Value>)"
>>
>> Context::New() takes a Local<ObjectTemplate> and a Local<Value>, not
>> MaybeLocal<ObjectTemplate> and MaybeLocal<Value>.
>>
>
--
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.