[Qt-interest] Fwd: Fwd: Fwd: Fwd: Fwd: Fwd: qmake and staticlibissue
Jonathan Kew
jonathan_kew at sil.org
Tue Apr 21 23:19:46 CEST 2009
On 21 Apr 2009, at 19:57, Scott Aron Bloom wrote:
> Check to make sure the guard is correct in the header file.
>
> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com
> ] On Behalf Of ami guru
> Sent: Tuesday, April 21, 2009 11:54 AM
> To: qt-interest at trolltech.com
> Subject: [Qt-interest] Fwd: Fwd: Fwd: Fwd: Fwd: Fwd: qmake and
> staticlibissue
>
> The error is as follows:
>
> Is starts with the instantiation of the GLRender object.
>
> And by the way which file inclusion you found that i did twice
>
> In the header file i have declared as
>
> class GLRender
>
> And in the source file i did:
>
>
> #include "GLRender.h"
>
>
> Regards
> Sajjad
>
> **********************************'
> GLWidget.cpp: In member function ‘void GLWidget::RenderWithGL()’:
> GLWidget.cpp:278: error: invalid use of incomplete type ‘struct
> GLRender’
Where's the definition of class GLRender? Simply putting "class
GLRender;" in the header won't work. That's an incomplete type (just
as the compiler says), and about the only thing you can use it for is
to pass around pointers. But if you're trying to call methods of an
object, the compiler needs the real thing, not just that stub.
(I don't see what this has to do with qmake or static libs; it's
simply C++.)
JK
More information about the Qt-interest-old
mailing list