Re: [v8-users] NewDefaultPlatform() unresolved external symbol
That just gives me other errors. I've looked at the https://bugs.chromium.org/p/v8/issues/list and I really just think the debug build is broken right now for win 10/MSVC. On Wednesday, September 25, 2019 at 5:18:07 AM UTC-7, Simon Zünd wrote: > > Could be related to the GN argument `use_custom_libcxx`. Try setting it to > true. My suspicion is, that the linked std::unique_ptr from your executable > doesn't match the std::unique_ptr from the V8 library. > > On Wed, Sep 25, 2019 at 1:26 PM Joe Smack > wrote: > >> I followed the instructions. I've tried several different setups and it >> just seems to me that V8's debug setup is screwed up. (Release build is >> fine.) >> >> On Monday, September 23, 2019 at 1:41:12 AM UTC-7, Jakob Kummerow wrote: >>> >>> Does it help if you follow the instructions <https://v8.dev/docs/embed>? >>> Specifically the part where it suggests to build v8_monolith and then link >>> against exactly that one library. >>> >>> Does #pragma comment(lib, "v8_libplatform.dll.lib") mean that you're >>> actually linking against v8_libplatform? >>> >>> >>> On Sun, Sep 22, 2019 at 2:33 PM Joe Smack wrote: >>> >>>> Can anyone please help me resolve this? I can't get rid of this error :\ >>>> >>>> >>>> I'm using version 7.7.299.11 of v8 and latest version of msvc. >>>> >>>> args.gn file >>>> is_component_build = false >>>> is_debug = false >>>> symbol_level = 1 >>>> target_cpu = "x64" >>>> use_goma = false >>>> >>>> >>>> My code: >>>> #include >>>> #include >>>> #include >>>> #include >>>> >>>> #include >>>> #include >>>> >>>> #pragma comment(lib, "v8.dll.lib") >>>> #pragma comment(lib, "v8_libbase.dll.lib") >>>> #pragma comment(lib, "v8_libplatform.dll.lib") >>>> #pragma comment(lib, "icui18n.dll.lib") >>>> #pragma comment(lib, "icuuc.dll.lib") >>>> #pragma comment(lib, "wee8.lib") >>>> >>>> >>>> int main() >>>> { >>>> if (v8::V8::InitializeICUDefaultLocation("v8 hello world.exe", >>>> "icudtl.dat") == false) >>>> return 0; >>>> >>>> v8::V8::InitializeExternalStartupData("natives_blob.bin", >>>> "snapshot_blob.bin"); >>>> >>>> >>>> std::unique_ptr platform = >>>> v8::platform::NewDefaultPlatform(); >>>> >>>> return 0; >>>> } >>>> >>>> My error: >>>> Severity Code Description Project File Line Suppression State >>>> Error LNK2019 unresolved external symbol "class std::unique_ptr>>> v8::Platform,struct std::default_delete > >>>> __cdecl v8::platform::NewDefaultPlatform(int,enum >>>> v8::platform::IdleTaskSupport,enum >>>> v8::platform::InProcessStackDumping,class >>>> std::unique_ptr>>> std::default_delete >)" >>>> >>>> (?NewDefaultPlatform@platform@v8@@YA?AV?$unique_ptr@VPlatform@v8@@U?$default_delete@VPlatform@v8@@@std@@@std@@HW4IdleTaskSupport@12@W4InProcessStackDumping@12@V? >>>> $unique_ptr@VTracingController@v8@@U?$default_delete@VTracingController@v8@@@std@@@4@@Z) >>>> >>>> referenced in function main v8 test app >>>> C:\Users\Documents\Visual Studio 2019\projects\v8 test app\v8 test >>>> app\v8 test app.obj 1 >>>> >>>> -- >>>> >>> -- >> -- >> v8-users mailing list >> v8-u...@googlegroups.com >> 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 v8-u...@googlegroups.com . >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/v8-users/36252d92-bdaa-4742-bc71-07de0ede30ec%40googlegroups.com >> >> <https://groups.google.com/d/msgid/v8-users/36252d92-bdaa-4742-bc71-07de0ede30ec%40googlegroups.com?utm_medium=email_source=footer> >> . >> > -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/26a1f15e-1a19-411d-8748-8ba1c5265cfa%40googlegroups.com.
Re: [v8-users] NewDefaultPlatform() unresolved external symbol
I followed the instructions. I've tried several different setups and it just seems to me that V8's debug setup is screwed up. (Release build is fine.) On Monday, September 23, 2019 at 1:41:12 AM UTC-7, Jakob Kummerow wrote: > > Does it help if you follow the instructions <https://v8.dev/docs/embed>? > Specifically the part where it suggests to build v8_monolith and then link > against exactly that one library. > > Does #pragma comment(lib, "v8_libplatform.dll.lib") mean that you're > actually linking against v8_libplatform? > > > On Sun, Sep 22, 2019 at 2:33 PM Joe Smack > wrote: > >> Can anyone please help me resolve this? I can't get rid of this error :\ >> >> >> I'm using version 7.7.299.11 of v8 and latest version of msvc. >> >> args.gn file >> is_component_build = false >> is_debug = false >> symbol_level = 1 >> target_cpu = "x64" >> use_goma = false >> >> >> My code: >> #include >> #include >> #include >> #include >> >> #include >> #include >> >> #pragma comment(lib, "v8.dll.lib") >> #pragma comment(lib, "v8_libbase.dll.lib") >> #pragma comment(lib, "v8_libplatform.dll.lib") >> #pragma comment(lib, "icui18n.dll.lib") >> #pragma comment(lib, "icuuc.dll.lib") >> #pragma comment(lib, "wee8.lib") >> >> >> int main() >> { >> if (v8::V8::InitializeICUDefaultLocation("v8 hello world.exe", >> "icudtl.dat") == false) >> return 0; >> >> v8::V8::InitializeExternalStartupData("natives_blob.bin", >> "snapshot_blob.bin"); >> >> >> std::unique_ptr platform = >> v8::platform::NewDefaultPlatform(); >> >> return 0; >> } >> >> My error: >> Severity Code Description Project File Line Suppression State >> Error LNK2019 unresolved external symbol "class std::unique_ptr> v8::Platform,struct std::default_delete > >> __cdecl v8::platform::NewDefaultPlatform(int,enum >> v8::platform::IdleTaskSupport,enum >> v8::platform::InProcessStackDumping,class >> std::unique_ptr> std::default_delete >)" >> >> (?NewDefaultPlatform@platform@v8@@YA?AV?$unique_ptr@VPlatform@v8@@U?$default_delete@VPlatform@v8@@@std@@@std@@HW4IdleTaskSupport@12@W4InProcessStackDumping@12@V? >> $unique_ptr@VTracingController@v8@@U?$default_delete@VTracingController@v8@@@std@@@4@@Z) >> >> referenced in function main v8 test app >> C:\Users\Documents\Visual Studio 2019\projects\v8 test app\v8 test app\v8 >> test app.obj 1 >> >> -- >> > -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/36252d92-bdaa-4742-bc71-07de0ede30ec%40googlegroups.com.
[v8-users] NewDefaultPlatform() unresolved external symbol
Can anyone please help me resolve this? I can't get rid of this error :\ I'm using version 7.7.299.11 of v8 and latest version of msvc. args.gn file is_component_build = false is_debug = false symbol_level = 1 target_cpu = "x64" use_goma = false My code: #include #include #include #include #include #include #pragma comment(lib, "v8.dll.lib") #pragma comment(lib, "v8_libbase.dll.lib") #pragma comment(lib, "v8_libplatform.dll.lib") #pragma comment(lib, "icui18n.dll.lib") #pragma comment(lib, "icuuc.dll.lib") #pragma comment(lib, "wee8.lib") int main() { if (v8::V8::InitializeICUDefaultLocation("v8 hello world.exe", "icudtl.dat") == false) return 0; v8::V8::InitializeExternalStartupData("natives_blob.bin", "snapshot_blob.bin"); std::unique_ptr platform = v8::platform::NewDefaultPlatform(); return 0; } My error: Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "class std::unique_ptr > __cdecl v8::platform::NewDefaultPlatform(int,enum v8::platform::IdleTaskSupport,enum v8::platform::InProcessStackDumping,class std::unique_ptr >)" (?NewDefaultPlatform@platform@v8@@YA?AV?$unique_ptr@VPlatform@v8@@U?$default_delete@VPlatform@v8@@@std@@@std@@HW4IdleTaskSupport@12@W4InProcessStackDumping@12@V? $unique_ptr@VTracingController@v8@@U?$default_delete@VTracingController@v8@@@std@@@4@@Z) referenced in function main v8 test app C:\Users\Documents\Visual Studio 2019\projects\v8 test app\v8 test app\v8 test app.obj 1 -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/ede4c956-37e2-40a8-921a-f8997fef4b38%40googlegroups.com.
Re: [v8-users] call javascript function from c++
Yes, the examples are horribly written and hard to understand. And I don't believe any of them covered this: // get the function v8::Local global = context->Global(); v8::Local function_value1 = global->Get(v8::String::NewFromUtf8(isolate, "StartNamespace")); v8::Local a = v8::Local::Cast(function_value1); v8::Local function_value2 = a->Get(v8::String::NewFromUtf8(isolate, "cppTalkTo")); v8::Local function1 = v8::Local::Cast(function_value2); // call it v8::Local js_result1; js_result1 = function1->Call(context, global, 0, nullptr).ToLocalChecked(); Unless there is a better way, please consider my original post answered. On Wednesday, June 6, 2018 at 3:07:33 AM UTC-7, Ben Noordhuis wrote: > > On Wed, Jun 6, 2018 at 11:42 AM, Joe Smack > wrote: > > Let's say you compile and run code: > > > > var StartNamespace = > > { > > cppTalkTo: function () { > > // some code > > } > > }; > > StartNamespace.init(); > > > > After you compile and run the above code how could you call cppTalkTo > from > > C++? Whats the C++ functions for that? > > > > > > Basically I want to: > > v8::Script::Run > > v8::Script::Compile > > At this point how do i get the cppTalkTo v8::Handle > and > > then call the function? > > Have you looked at the examples in the samples/ directory? > samples/shell.cc in particular is a good starting point. > -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[v8-users] call javascript function from c++
Let's say you compile and run code: var StartNamespace = { cppTalkTo: function () { // some code } }; StartNamespace.init(); After you compile and run the above code how could you call cppTalkTo from C++? Whats the C++ functions for that? Basically I want to: v8::Script::Run v8::Script::Compile At this point how do i get the cppTalkTo v8::Handle and then call the function? -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [v8-users] InitializeICUDefaultLocation
I just cant get it to work. :/ I wish I could get some visual studio files to see how everything is set up. On Saturday, May 26, 2018 at 2:14:13 AM UTC-7, Ben Noordhuis wrote: > > On Sat, May 26, 2018 at 11:03 AM, Joe Smack <messi...@gmail.com > > wrote: > > What is the proper way to do this function? I just can't get it to work. > > > > My code: > > const char * exec_path = "C:\\Users\\Joe Smack\\Documents\\Visual Studio > > 2017\\Projects\\v8 console test\\v8 console test"; > > const char * icu_data_file = "icudtl.dat"; > > V8::InitializeICUDefaultLocation(exec_path, icu_data_file); > > > > This code is giving me an exception in the function InitializeICU > (called > > from InitializeICUDefaultLocation) when it gets to FILE* inf = > > fopen(icu_data_file, "rb"); (line 95) > > The debugger says icu_data_file = icudtl.dat > > > > i copied icudtl.dat to the project directory from v8 directory. Any help > is > > greatly appreciated. > > You can pass nullptr as the second argument and V8 will look for > icudtl.dat relative to the executable. > > If you pass in a file path, it should be either absolute or relative > to the current working directory (_not_ the executable.) > -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[v8-users] InitializeICUDefaultLocation
What is the proper way to do this function? I just can't get it to work. My code: const char * exec_path = "C:\\Users\\Joe Smack\\Documents\\Visual Studio 2017\\Projects\\v8 console test\\v8 console test"; const char * icu_data_file = "icudtl.dat"; V8::InitializeICUDefaultLocation(exec_path, icu_data_file); This code is giving me an exception in the function InitializeICU (called from InitializeICUDefaultLocation) when it gets to FILE* inf = fopen(icu_data_file, "rb"); (line 95) The debugger says icu_data_file = icudtl.dat i copied icudtl.dat to the project directory from v8 directory. Any help is greatly appreciated. -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [v8-users] entry point error
Copied it over first thing :) Weird. -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[v8-users] Re: entry point error
> > here is my simple program: > #include "stdafx.h" #include #include #include #include "libplatform/libplatform.h" #include "v8.h" using namespace v8; #pragma comment(lib, "v8.dll.lib") int main(int argc, char* argv[]) { v8::V8::InitializeICUDefaultLocation(argv[0]); return 0; } -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[v8-users] entry point error
Can anybody please help me with my errors; The procedure entry point ??0ByteSink@icu_61@@@ could not be located in the dynamic link library G:\project\v8simp\icui18n.dll The procedure entry point ??0ByteSink@icu_61@@@ could not be located in the dynamic link library G:\project\v8simp\v8.dll -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.