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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stephen torri <storri@xxxxxxxxx> 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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux