Hello Ramesh, There might be a bit of confusion going on here. You are building V8 using `is_component_build = true` but would like to use `v8_libplatform.lib` as a static library. Note that V8 can be built either in component or in non-component mode but not in both modes.
IIUC the error comes from a component that tries to use libplatform built in component mode. It seems that you forgot to add v8_libplatform.lib to the linker input. Regards, Igor On Fri, Apr 26, 2024 at 9:48 AM Ramesh Voliveti <rvoliv...@gmail.com> wrote: > Hi All, > > I am in the process of building the V8 source code of version 12.3.220 on > windows mainly. > > I used the following GN arguments. > > is_debug = true > v8_enable_i18n_support = true > is_component_build = true > symbol_level = 1 > v8_enable_object_print = true > v8_use_external_startup_data = true > > The build generated the v8 dlls and libraries > Among then one of the library named v8_libplatform.lib has been used in > our programs as a static library. > > While building our code, we see lot of linker errors. like below. > Error LNK2001 unresolved external symbol "__declspec(dllimport) class > std::unique_ptr<class v8::Platform,struct std::default_delete<class > v8::Platform> > __cdecl v8::platform::NewDefaultPlatform(int,enum > v8::platform::IdleTaskSupport,enum > v8::platform::InProcessStackDumping,class std::unique_ptr<class > v8::TracingController,struct std::default_delete<class > v8::TracingController> >,enum v8::platform::PriorityMode)" > (__imp_?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@W4PriorityMode@12@@Z) > jsinterpreter > c:\Code71\docplatform\code\interpreters\jsinterpreter\jsscripthandler.obj > 1 > > Can someone please help me solve these errors? > > I tried to use different combinations of gn arguments but ended up with > same sized library file which is giving linker errors when used in our code. > > Kindly help providing the suitable GN arguments that generates perfect > library files. > > My main requirement is to generate the v8.dll, v8.lib,v8_libbase.dll, > v8_libbase.lib, v8_libplatform.dll and v8_libplatform.lib files. > > Thanks in advance. > > Best regards, > rvoliveti > > -- > -- > 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/18ea3b2a-cecb-4438-8d8a-e160427a7433n%40googlegroups.com > <https://groups.google.com/d/msgid/v8-users/18ea3b2a-cecb-4438-8d8a-e160427a7433n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Igor Sheludko Software Engineer ish...@google.com Google Germany GmbH Erika-Mann-Straße 33 80636 München Geschäftsführer: Paul Manicle, Liana Sebastian Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde. This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person. -- -- 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/CAOAEZ4M9HsXKbvhUneLXkgCfUSwAwqz_t6bO-%3D7sLBZVp%3DRHKQ%40mail.gmail.com.