On Jun 2, 2015, at 11:41 PM, Milinda Fernando <milind...@gmail.com> wrote:

> Hello Sean and BRLCAD developers,
> 
> I am still trying to create the qt libdm window. Here is my source code 
> regarding libdm window  creation [1]. When I try to build this I get the 
> following error list[2]. What I have done wrong ? How can I fix this ?
> 
> /home/milinda/Qt_Projects/brlcad/src/libdm/dm-qt.cpp:722: error: invalid use 
> of incomplete type 'struct qt_openFb(dm_internal*)::qt_fb_info'
>      qtfb_ps->qapp = privars->qapp;
>             ^

When presented with a wall of errors, it’s best to only focus on the first one. 
 As you can see, the error says that you have an incomplete type.  What does 
that mean?

A quick web search and you’d find that an incomplete type in C (particularly 
with an incomplete struct, which is your case here) usually means something was 
forward declared (e.g., “struct foo;”) but not fully declared (e.g.”struct foo 
{int a;};”.  This usually means you are missing a header or preprocessor symbol.

You need to look at the qt_openFb(dm_internal*)::qt_fb_info struct and figure 
out what wasn’t fully declared.  Given the dm headers require preprocessor 
symbols be defined in order to know which display types are available (e.g., 
DM_X, DM_OGL, etc), that might be the first place to look.  Read the headers 
you include and make sure the structures you’re using will be fully declared.

Cheers!
Sean


------------------------------------------------------------------------------
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to