[v8-users] Is "is_component_build" expected to work at all in v8 7.8?

2019-10-31 Thread Ben Ernst
Is the idea of a "component build", where you specify 
"is_component_build=true" in the arguments to GN, actually supposed to work 
at all in V8 (v7.8)?

In particular, I am getting this unresolved external symbol:

1>ezv8_platform.obj : error LNK2019: unresolved external symbol 
"__declspec(dllimport) class std::unique_ptr > __cdecl 
v8::platform::NewDefaultPlatform(int,enum 
v8::platform::IdleTaskSupport,enum 
v8::platform::InProcessStackDumping,class std::unique_ptr >)" 
(__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@@Z)
 
referenced in function "public: __cdecl ezv8::Platform::Impl::Impl(void)" 
(??0Impl@Platform@ezv8@@QEAA@XZ)

The function "NewDefaultPlatform" seems to be exported from v8_libplatform.

V8_PLATFORM_EXPORT std::unique_ptr NewDefaultPlatform(
int thread_pool_size = 0,
IdleTaskSupport idle_task_support = IdleTaskSupport::kDisabled,
InProcessStackDumping in_process_stack_dumping =
InProcessStackDumping::kDisabled,
std::unique_ptr tracing_controller = {});

But the destructor of the base class, v8::Platform is not exported.

/**
 * V8 Platform abstraction layer.
 *
 * The embedder has to provide an implementation of this interface before
 * initializing the rest of V8.
 */
class Platform {
 public:
  virtual ~Platform() = default;


I think that's the cause of the error above, although I may have 
misinterpreted the error message.

Am I barking up the wrong tree by trying to use the component build at all?

Thanks in advance for any advice.



-- 
-- 
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/34747261-186a-43b3-8383-9d85857b2e66%40googlegroups.com.


Re: [v8-users] NewDefaultPlatform() unresolved external symbol

2019-10-31 Thread Ben Ernst
Joe, I have the same problem. Static build, dynamic build, debug build, 
release build, I get unresolved external symbols with every build.

On Monday, 30 September 2019 19:24:43 UTC+9:30, Joe Smack wrote:
>
> 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 ? 
 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
>>>  
>>> 
>>> .
>>>
>>

-- 
-- 
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/1090185e-965b-47b0-b27b-6e9f42b11e5f%40googlegroups.com.