Open QQ631556613 opened 6 months ago
What is IAR?
What is IAR?
It's a commercial compiler tool chain which his mainly used on ARM embedded platform, may have different implementation in C++ template with other tool chains like MSVC and GCC, so it reports errror when building latest harbuzz source code. I am new to the source code of harfbuzz, have no idea how to adapt the code to the IAR toolchain.
And from the IAR manual, it says: TEMPLATES C++ supports templates according to the C++ standard. The implementation uses a two-phase lookup which means that the keyword typename must be inserted wherever needed. Furthermore, at each use of a template, the definitions of all possible templates must be visible. This means that the definitions of all templates must be in include files or in the actual source file.
So for the compile error I posted above, I think it is because the template definition is not precede its uses.
I'm afraid we can't help. You need someone who knows C++ support in that compiler to debug the issue and ideally propose a solution.
Hello guys, I am now tring to compile harfbuzz with IAR compiler, but got the bellow error, can anybody help me, thanks in advance.
IAR Command Line Build Utility V9.0.5.7680 Copyright 2021-2021 IAR Systems AB. harfbuzzport - Debug Reading project nodes... Cleaning... 1 files. harfbuzz.cc D:\harfbuzz-8.4.0\src\hb-ot-layout-gpos-table.hh(50) : Error[Pe1449]: explicit specialization of function "OT::Layout::GPOS_impl::PosLookup::dispatch_recurse_func(context_t , unsigned int) [with context_t=OT::hb_closure_lookups_context_t]" must precede its first use (at line 4674 of "D:\harfbuzz-8.4.0\src\OT\Layout\GPOS../../../hb-ot-layout-gsubgpos.hh" )
D:\harfbuzz-8.4.0\src\hb-null.hh(94) : Error[Pe070]: incomplete type is not allowed
detected during:
instantiation of class "_hb_min_size<T, > [with T=OT::cmap, =void]" <SRCREF line=281 file=D:\harfbuzz-8.4.0\src\hb-array.hh">at line 281 of D:\harfbuzz-8.4.0\src\hb-array.hh"
instantiation of "inline T const hb_array_t::as<T,P,>() const [with Type=char const, T=OT::cmap, P=1U, =(void )nullptr]" <SRCREF line=59 file=D:\harfbuzz-8.4.0\src\hb-blob.hh">at line 59 of D:\harfbuzz-8.4.0\src\hb-blob.hh"
instantiation of "inline Type const hb_blob_t::as() const [with Type=OT::cmap]" <SRCREF line=88 file=D:\harfbuzz-8.4.0\src\hb-blob.hh">at line 88 of D:\harfbuzz-8.4.0\src\hb-blob.hh"
instantiation of "inline hb_blob_ptr_t
::T const *hb_blob_ptr_t
::get() const [with P=OT::cmap]" <SRCREF line=1584 file=D:\harfbuzz-8.4.0\src\hb-ot-cmap-table.hh">at line 1584 of D:\harfbuzz-8.4.0\src\hb-ot-cmap-table.hh"