Just the header file for the public V8 API ( https://chromium.googlesource.com/v8/v8.git/+/refs/heads/master/include/v8.h#18) includes <memory>, <string>, <type_traits>, <utility>, and <vector> from the C++ standard library. I'm unclear what they are all needed for, but I think it's safe to say mixing C++ standard libraries when building and consuming V8 is always going to be high risk, unsupported, and if you do manage to get it working today - very fragile going forward.
- Bill On Thursday, December 19, 2019 at 7:55:52 AM UTC-8, ClearScript Developers wrote: > > Unfortunately this issue transcends export naming. V8 seems to be > embracing STL data types all over its API. > > By sheer luck std::unique_ptr is likely to work across STL implementations > (at least when used without a stateful deleter), but other data types > aren't so lucky. V8 already has a bunch of APIs that pass or return > std::shared_ptr, and that's pretty much guaranteed to fail. > > On Wednesday, December 18, 2019 at 1:58:41 PM UTC-5, Ivan Pizhenko wrote: >> >> That’s clear, the instruction under the link suggests to build V8 as >> static library, which we already know to be working. But the point was to >> build and use V8 as DLL. Meanwhile, I’ve found following workaround: add 2 >> new custom functions to the libplatform, the first one returns normal >> pointer extracted from return value of the NewDefaultPlatform() and second >> to delete v8::Platform object (this is to ensure we use both new and delete >> from libc++), and export these functions from DLL. This way I’ve gotten rid >> of dependency on the std::unique_ptr version coming from libc++. And based >> on this experience I’d generally suggest to V8 developers to keep all >> public V8 APIs w/o any STL stuff for the sake of better integration with >> different compilers, which with very high probability have different STL >> implementations than libc++. >> >> - Ivan >> >> >> >> >> >> *From: *'Bill Ticehurst' via v8-users >> *Sent: *Wednesday, December 18, 2019 20:22 >> *To: *v8-users >> *Subject: *[v8-users] Re: Building v8 shared library on windows >> >> >> >> I believe this is still mostly correct - (some filenames might be out of >> date, but should give you a general starting point). If you're already >> building V8 successfully with MSVC, you should be able to skip down to the >> "Embedding V8 into a custom application" part. >> >> >> >> >> https://medium.com/angular-in-depth/how-to-build-v8-on-windows-and-not-go-mad-6347c69aacd4 >> >> >> >> Disclaimer: As should be obvious by now (and by the above post), this >> stuff is a moving target (e.g. changing compilers and build outputs over >> time), non-trivial, and not a first-class supported scenario. The "well >> trodden" and best supported path is to build your code via a new BUILD.gn >> target with Clang along with the rest of V8, that way you can ensure your >> compiler and build settings are all consistent, and the dependencies are >> largely managed for you. Good luck! >> >> >> >> - Bill >> >> On Wednesday, December 18, 2019 at 3:09:50 AM UTC-8, Bad_At_Life wrote: >> >> Ok Bill >> >> Then I'll build it statically with "is_component_build = false". I don't >> really need them to be dynamic, I just need them to work. >> >> What file extension should I look for? .lib? >> >> Thank you >> >> -- >> -- >> 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/554c96a8-82e1-4a6d-86c7-2a65d51c5797%40googlegroups.com >> >> <https://groups.google.com/d/msgid/v8-users/554c96a8-82e1-4a6d-86c7-2a65d51c5797%40googlegroups.com?utm_medium=email&utm_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/c64e6796-74f7-4bbd-9701-750632714cd7%40googlegroups.com.