This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Method for finding reason behind "error: `obj' has incomplete type"


Stephen torri <storri@torri.org> writes:

> ../../src/data_source/File_Data_Transfer_T.cpp:78: error: `obj' has
> incomplete type
> ../../src/data_source/File_Data_Transfer_T.cpp:78: error: storage size
> of `obj' isn't known

The error means that you are trying to create an object (named 'obj')
but you are using a type which you have not fully defined.  The
compiler does not know how large the object should be.

> 	typename Data_Type::worker_type obj (new Data_Type());

I don't know what Data_Type is, but it appears that it is not fully
defined.  For example, you might just have "class Data_Type;" without
any definition of the class.

> Is there a compiler flag that I should use?

No.  You need to fix your program.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]