undefined identifier iEikonEnv(转)

  1. undefined identifier iEikonEnv - 2006-08-14 12:42#1

    krappies

    krappies is offline

    Registered Userkrappies's Avatar

    Join Date
    Aug 2006
    Posts
    3
    hi
    i am trying to get into symbian c++ development. i have no background whatsoever with symbian.
    i am using carbide.c++ with a nokia n91 (s60 3rd edition).
    the hello world app compile and run perfectly, but when i use iEikonEnv->TitleFont();in my program i get an error: undefined identifier iEikonEnv. this happens wherever i have iEikonEnv, not only for TitleFont();
    i have this in my AppView class.
    can anyone please shed some light on this as i can not find a solution anywhere.
    thanx

    Reply With QuoteReply With Quote

  2. Re: undefined identifier iEikonEnv - 2006-08-14 13:44#2

    wizard_hu_

    wizard_hu_ is offline

    Forum Nokia Championwizard_hu_'s Avatar

    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    21,552
    iEikonEnv is a bit tricky: it is not a variable, it is a macro defined in eikdef.h (it is casting the existing iCoeEnv to a CEikonEnv*). Make sure it is included (and you may also need to include eikenv.h).

    Reply With QuoteReply With Quote

  3. Re: undefined identifier iEikonEnv - 2006-08-14 14:10#3

    krappies

    krappies is offline

    Registered Userkrappies's Avatar

    Join Date
    Aug 2006
    Posts
    3
    thanx alot
    i just have not included the two header files. my tutorial says nothing about them.
    maybe now i can FINALLY get to display my own stuff :)
    cheers

    Reply With QuoteReply With Quote

  4. Re: undefined identifier iEikonEnv - 2009-05-21 14:07#4

    sagar_kasture

    sagar_kasture is offline

    Registered Usersagar_kasture's Avatar

    Join Date
    Jan 2009
    Posts
    20

    Quote Originally Posted by wizard_hu_ View Post

    iEikonEnv is a bit tricky: it is not a variable, it is a macro defined in eikdef.h (it is casting the existing iCoeEnv to a CEikonEnv*). Make sure it is included (and you may also need to include eikenv.h).

    even after including above 2 files im having same error. Please suggest me something.

    Sagar Kasture

    Reply With QuoteReply With Quote

  5. Re: undefined identifier iEikonEnv - 2009-05-21 14:12#5

    kishore84

    kishore84 is offline

    Super Contributorkishore84's Avatar

    Join Date
    Jul 2007
    Posts
    582

    Quote Originally Posted by sagar_kasture View Post

    even after including above 2 files im having same error. Please suggest me something.

    what is the error msg??

    Reply With QuoteReply With Quote

  6. Re: undefined identifier iEikonEnv - 2009-05-22 06:11#6

    sagar_kasture

    sagar_kasture is offline

    Registered Usersagar_kasture's Avatar

    Join Date
    Jan 2009
    Posts
    20
    error is : undefined identifier 'iCoeEnv'
    im geting it for line
    CEPGAppUi* appUi = (CEPGAppUi*)iEikonEnv->AppUi();

    Sagar Kasture

    Reply With QuoteReply With Quote

  7. Re: undefined identifier iEikonEnv - 2009-05-22 06:15#7

    skumar_rao

    skumar_rao is offline

    Forum Nokia Championskumar_rao's Avatar

    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,383

    Send a message via MSN to skumar_rao Send a message via Yahoo to skumar_rao Send a message via Skype™ to skumar_rao

    Quote Originally Posted by sagar_kasture View Post

    error is : undefined identifier 'iCoeEnv'
    im geting it for line
    CEPGAppUi* appUi = (CEPGAppUi*)iEikonEnv->AppUi();

    on which class you are calling verify that you have a member variable iEikonEnv

    Reply With QuoteReply With Quote

  8. Re: undefined identifier iEikonEnv - 2009-05-22 10:04#8

    sagar_kasture

    sagar_kasture is offline

    Registered Usersagar_kasture's Avatar

    Join Date
    Jan 2009
    Posts
    20
    how do i find out if the variable is member of my class. For other classes doing same is working.

    Sagar Kasture

    Reply With QuoteReply With Quote

  9. Re: undefined identifier iEikonEnv - 2009-05-22 10:32#9

    kishore84

    kishore84 is offline

    Super Contributorkishore84's Avatar

    Join Date
    Jul 2007
    Posts
    582

    Quote Originally Posted by sagar_kasture View Post

    error is : undefined identifier 'iCoeEnv'
    im geting it for line
    CEPGAppUi* appUi = (CEPGAppUi*)iEikonEnv->AppUi();

    Try this way rather

    Code:

    CCoeEnv::static()->AppUi()

    include apropriate headers and lib

posted @ 2010-12-31 10:20  冰岛  阅读(689)  评论(0编辑  收藏  举报