linux - C++ templates in GCC -
this question has answer here:
i have problems porting windows application linux (gcc).
i have following code in windows (visual studio 2010 compiling well): have template class, contains structure.
template<typename bidtype> class pst_bc_block : public pst_entries_block<bidtype> { public: ... struct tag_bc { word id; word type; dword value; }; ... }
when i'm trying this:
pst_bc_block<bidtype>::tag_bc tag_value; tag_value.id = 6;
gcc can't resolve id member.
p.s. windows types defined , vs comple well.
tag_bc template-dependent type. try :
typename pst_bc_block<bidtype>::tag_bc tag_value;
edit: encounter trouble if forgot redefine windows' word, dword , such.
Comments
Post a Comment