emscripten ASSERTIONS=1 生成链接器错误 "Referencing global in another module!"
emscripten ASSERTIONS=1 generates linker error "Referencing global in another module!"
当我设置“-s ASSERTIONS=1”时,链接器将失败并显示大量 "Referencing global in another module!" 消息,例如:
Referencing global in another module! [16 x i8]*
@_ZZN8nlohmann10basic_jsonINSt3__23mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbxydS7_NS_14adl_serializerEE13escape_stringERKS9_E6hexify
; ModuleID =
'src/ui_lib/logic/libcommands.bc'
[16 x i8]*
@_ZZN8nlohmann10basic_jsonINSt3__23mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbxydS7_NS_14adl_serializerEE13escape_stringERKS9_E6hexify
; ModuleID =
'src/ui_lib/curves.bc'
Referencing global in another module!
%"struct.ui::EmscriptenBindingInitializer_uicurves"*
@_ZN5boost6detail15optional_detail13none_instanceINS_6none_tEE8instanceE
; ModuleID =
'src/ui_lib/logic/libcommands.bc'
%"struct.ui::EmscriptenBindingInitializer_uicurves"*
@_ZN5boost6detail15optional_detail13none_instanceINS_6none_tEE8instanceE
; ModuleID =
'src/ui_lib/curves.bc'
当我在多个翻译单元中使用 nlohmann::json (https://github.com/nlohmann/json) 的实例时会发生这种情况。
这是错误还是功能?我该如何解决?
当我设置“-s ASSERTIONS=1”时,链接器将失败并显示大量 "Referencing global in another module!" 消息,例如:
Referencing global in another module! [16 x i8]* @_ZZN8nlohmann10basic_jsonINSt3__23mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbxydS7_NS_14adl_serializerEE13escape_stringERKS9_E6hexify ; ModuleID = 'src/ui_lib/logic/libcommands.bc' [16 x i8]* @_ZZN8nlohmann10basic_jsonINSt3__23mapENS1_6vectorENS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbxydS7_NS_14adl_serializerEE13escape_stringERKS9_E6hexify ; ModuleID = 'src/ui_lib/curves.bc' Referencing global in another module! %"struct.ui::EmscriptenBindingInitializer_uicurves"* @_ZN5boost6detail15optional_detail13none_instanceINS_6none_tEE8instanceE ; ModuleID = 'src/ui_lib/logic/libcommands.bc' %"struct.ui::EmscriptenBindingInitializer_uicurves"* @_ZN5boost6detail15optional_detail13none_instanceINS_6none_tEE8instanceE ; ModuleID = 'src/ui_lib/curves.bc'
当我在多个翻译单元中使用 nlohmann::json (https://github.com/nlohmann/json) 的实例时会发生这种情况。
这是错误还是功能?我该如何解决?