"Illegal use of incomplete struct/union/class" err

Login to reply to this topic.
Mon, 2005-02-21 10:54
Joined: 2005-01-12
Forum posts: 31
Hello,
when I try to compile my application I get an

"Illegal use of incomplete struct/union/class" error...

What does it mean? How can I avoid it?  Sad

Thanks

Certocerto

Mon, 2005-02-21 11:15
Joined: 2004-07-28
Forum posts: 1379
"Illegal use of incomplete struct/union/class" err
Could mean a whole number of things - missing #includes being quite a common cause.

Put up the code.

didster

Mon, 2005-02-21 11:55
Joined: 2005-01-12
Forum posts: 31
"Illegal use of incomplete struct/union/class" err
I have fixed it, thanks.

If fact in my Document there was a #include missing... I wasn't including my AppUi.h

Thanks
Certocerto
Mon, 2007-08-06 08:17
Joined: 2006-12-19
Forum posts: 72
Re: "Illegal use of incomplete struct/union/class" err

and what is d case here? here is d code:

// INCLUDE FILES

// Class include
#include "SimpleDlgAppUi.h"

// System includes
#include // R_SIMPLEDLG_DIALOG

// User includes
#include "SimpleDlgDialog.h" // CSimpleDlgDialog
#include "SimpleDlgPlayerNameDialog.h" // CSimpleDlgPlayerNameDialog

// ================= MEMBER FUNCTIONS =======================

/**
* Symbian OS 2nd phase constructor. Constructs and executes the application's dialog,
* setting itself as the dialog's MOP parent, and adds it to the control
* stack.
*/
void CSimpleDlgAppUi::ConstructL()
{
BaseConstructL();
iAppDialog = new (ELeave) CSimpleDlgDialog;
iAppDialog->SetMopParent(this);
iAppDialog->ExecuteLD(R_SIMPLEDLG_DIALOG);
AddToStackL(iAppDialog);
}

/**
* Destructor.
* Removes the application's dialog from the stack and deletes it.
*/
CSimpleDlgAppUi::~CSimpleDlgAppUi()
{
if (iAppDialog)
{
RemoveFromStack(iAppDialog);
delete iAppDialog;
}
}

/**
* From CEikAppUi, takes care of command handling.
*
* @param aCommand command to be handled
*/
void CSimpleDlgAppUi::HandleCommandL(TInt aCommand)
{
switch (aCommand)
{
case ESimpleDlgCmdNewGame:
{
if (CSimpleDlgPlayerNameDialog::RunDlgLD (iPlayerName))
{
StartNewGameL();
/* code added by me...intisllly it was empty
{

}
iLabel = new (ELeave) CEikLabel;
iLabel->SetContainerWindowL(*this);

HBufC* labelText;
labelText = StringLoader::LoadLC(R_LABEL_TEXT); // Pushes labelText onto the Cleanup Stack.
iLabel->SetTextL(*labelText);
CleanupStack::PopAndDestroy(labelText);
};*/
break;
}
}
case EEikCmdExit:
{
Exit();
break;
}
default:
break;
}
}

void CSimpleDlgAppUi::StartNewGameL()
{

CEikLabel* iLabel = new (ELeave) CEikLabel;
iLabel->SetContainerWindowL(*this);

HBufC* labelText;
labelText = StringLoader::LoadLC(R_LABEL_TEXT); // Pushes labelText onto the Cleanup Stack.
iLabel->SetTextL(*labelText);
CleanupStack::PopAndDestroy(labelText);
}

// End of File

Thanks,
Netra

Mon, 2007-08-06 09:39
Forum Nokia Champion
Joined: 2004-05-26
Forum posts: 732
Re: "Illegal use of incomplete struct/union/class" err

You should have mentioned a short description about the error and on which line it's getting or at least copy paste the error message here to get more replies...


Fri, 2008-10-17 06:08
Joined: 2008-09-25
Forum posts: 1
Re: "Illegal use of incomplete struct/union/class" err

Hi all,

i am getting this error while Initialization of DynInitMenuPaneL

illegal use of incomplete struct/union/class 'CEikMenuPane'

how to rectify it.. ?

Fri, 2008-10-17 07:07
Joined: 2005-11-20
Forum posts: 1242
Re: "Illegal use of incomplete struct/union/class" err

By including the header file for that class, probably eikmenup.h.


René Brunner

Fri, 2008-10-17 08:09
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 2006
Re: "Illegal use of incomplete struct/union/class" err

Actually you can open the documentation and look for CEikMenuPane to get your answer.


Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

  • Login to reply to this topic.