I was suggesting what I believe to be the opposite from what you did.   The 
compiled v8 needs libc++ but you're building with libstdc++.
  
Try building your code with -stdlib=libc++ and see what happens.  

This is just a guess, though.. if someone else has better info, do what 
they say :)

On Thursday, March 22, 2018 at 4:26:47 PM UTC-7, Eduardo Bolis wrote:
>
> I put libstdc++ in my library list, even try to link it statically but 
> nothing changes. Is there any way else to do it?
>
> On Thursday, March 22, 2018 at 7:42:23 PM UTC-3, Zac Hansen wrote:
>>
>> I believe the std:: issues are from you linking v8 compiled with libc++ 
>> against libstdc++.   
>>
>> On Thursday, March 22, 2018 at 3:37:50 PM UTC-7, Eduardo Bolis wrote:
>>>
>>> These are the first error lines (there are hundreds of them):
>>>
>>> g++     -o dist/Debug/GNU-Linux/teste-v8 build/Debug/GNU-Linux/main.o 
>>> -L/home/eduardo/workspace/v8-master/v8/out.gn/x64.release/obj 
>>> -L/home/eduardo/workspace/v8-master/v8/
>>> out.gn/x64.release/obj/third_party/icu -lv8_base -lv8_libbase 
>>> -lv8_external_snapshot -lv8_libplatform -lv8_libsampler -licuuc -licui18n 
>>> -lrt -ldl -pthread -std=c++11
>>>
>>> build/Debug/GNU-Linux/main.o: na função `main':
>>>
>>> /home/eduardo/Apps/projetos/teste-v8/main.cpp:25: referência indefinida 
>>> para `v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, 
>>> v8::platform::InProcessStackDumping, std::unique_ptr<v8::TracingController, 
>>> std::default_delete<v8::TracingController> >)'
>>> /home/eduardo/workspace/v8-master/v8/
>>> out.gn/x64.release/obj/libv8_base.a(api.o): na função 
>>> `v8::SnapshotCreator::CreateBlob(v8::SnapshotCreator::FunctionCodeHandling)':
>>> api.cc:(.text._ZN2v815SnapshotCreator10CreateBlobENS0_20FunctionCodeHandlingE+0xd27):
>>>  
>>> referência indefinida para 
>>> `std::__1::__vector_base_common<true>::__throw_length_error() const'
>>> api.cc:(.text._ZN2v815SnapshotCreator10CreateBlobENS0_20FunctionCodeHandlingE+0xd33):
>>>  
>>> referência indefinida para 
>>> `std::__1::__vector_base_common<true>::__throw_length_error() const'
>>> /home/eduardo/workspace/v8-master/v8/
>>> out.gn/x64.release/obj/libv8_base.a(api.o): na função 
>>> `v8::WasmModuleObjectBuilderStreaming::WasmModuleObjectBuilderStreaming(v8::Isolate*)':
>>> api.cc:(.text._ZN2v832WasmModuleObjectBuilderStreamingC2EPNS_7IsolateE+0x282):
>>>  
>>> referência indefinida para `std::__1::__shared_weak_count::__release_weak()'
>>> api.cc:(.text._ZN2v832WasmModuleObjectBuilderStreamingC2EPNS_7IsolateE+0x2ae):
>>>  
>>> referência indefinida para `std::__1::__shared_weak_count::__release_weak()'
>>> /home/eduardo/workspace/v8-master/v8/
>>> out.gn/x64.release/obj/libv8_base.a(api.o): na função 
>>> `v8::WasmModuleObjectBuilderStreaming::~WasmModuleObjectBuilderStreaming()':
>>> api.cc:(.text._ZN2v832WasmModuleObjectBuilderStreamingD2Ev+0x82): 
>>> referência indefinida para `std::__1::__shared_weak_count::__release_weak()'
>>> /home/eduardo/workspace/v8-master/v8/
>>> out.gn/x64.release/obj/libv8_base.a(api.o): na função 
>>> `v8::debug::Script::LineEnds() const':
>>> api.cc:(.text._ZNK2v85debug6Script8LineEndsEv+0x2ce): referência 
>>> indefinida para 
>>> `std::__1::__vector_base_common<true>::__throw_length_error() const'
>>> /home/eduardo/workspace/v8-master/v8/
>>> out.gn/x64.release/obj/libv8_base.a(api.o): na função 
>>> `v8::debug::Coverage::FunctionData::GetBlockData(unsigned long) const':
>>> api.cc:(.text._ZNK2v85debug8Coverage12FunctionData12GetBlockDataEm+0x5e): 
>>> referência indefinida para 
>>> `std::__1::__vector_base_common<true>::__throw_out_of_range() const'
>>> /home/eduardo/workspace/v8-master/v8/
>>> out.gn/x64.release/obj/libv8_base.a(api.o): na função 
>>> `v8::debug::Coverage::ScriptData::GetFunctionData(unsigned long) const':
>>> api.cc:(.text._ZNK2v85debug8Coverage10ScriptData15GetFunctionDataEm+0x5d): 
>>> referência indefinida para 
>>> `std::__1::__vector_base_common<true>::__throw_out_of_range() const'
>>> /home/eduardo/workspace/v8-master/v8/
>>> out.gn/x64.release/obj/libv8_base.a(api.o): na função 
>>> `v8::debug::Coverage::ScriptData::ScriptData(unsigned long, 
>>> std::__1::shared_ptr<v8::internal::Coverage>)':
>>>
>>> The "main.cpp" file is just a copy of "hello_world.cc" from V8.
>>> From what I can see, these are internal errors of libraries, not of 
>>> source code.
>>> I believe that not all object files are embedded in them, but I have no 
>>> idea why.
>>>
>>

-- 
-- 
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.

Reply via email to