×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    92

    Smile Undefined reference...

    Hi Everyone,

    I am getting error like
    `CMyclass::ConstructL(CMyApplicationAppUi*)':
    Myclass.cpp.text+0x1c8): undefined reference to `CMyclass::CheckIfSilentMode()'
    make[1]: *** [..\..\..\..\9.1\S60_3rd\EPOC32\RELEASE\GCCE\UREL\MyApplication_0xE2ADAADF.exe] Error 1
    make: *** [TARGETEISENVTONES] Error 2

    If i keep CheckIfSilentMode() function in my application then error comes at release time, if i remove then application running perfectly.

    Why it is so?
    There is nothing in this function.
    Is there any memory allocation problem? or any other kind of problem?
    please help!!
    Nirav

  2. #2
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: Undefined reference...

    What do you mean by "error comes at release time"? Are you defining CMyclass::CheckIfSilentMode() (ie. implementing it)?

  3. #3
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    92

    Re: Undefined reference...

    hi

    Yes,

    It is coming at release time. There is nothing in this function, if i remove this function then no error occur at release time.(while i am calling that function)

  4. #4
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: Undefined reference...

    But what you're showing above is a linker error. If by 'release time' you mean 'running the application', then you may be getting a panic. Search the forum and wiki about how to find out which panic code you're getting.

  5. #5
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    92

    Re: Undefined reference...

    It is not coming at running time it is coming at release time,
    How can i run application without building in release mode?

    I thinks this is another problem
    If i make any function & trying to call that function then error comes at release time & if i am not calling then no error occur.

  6. #6
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: Undefined reference...

    Quote Originally Posted by parikhnirav.aits View Post
    It is not coming at running time it is coming at release time,
    How can i run application without building in release mode?
    What you posted is a link-time error. You should get this error whether you build for debug or release (of course, assuming you're compiling the same code in both cases)

    I thinks this is another problem
    If i make any function & trying to call that function then error comes at release time & if i am not calling then no error occur.
    Could you please paste the snippet to see how that function is defined?

  7. #7
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    92

    Re: Undefined reference...

    TBool CMyclass::CheckStatus()
    {
    return ETrue;
    }

    Now if i call this function from any function of my CMyclass it gives error. That error i already mention in my thread.

    & if i not call this function. No error occur.

    Is there any limitation of size of class in terms of memory allocation?
    because CMyclass is very big.

  8. #8
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: Undefined reference...

    Note the error the linker is giving you:
    undefined reference to `CMyclass::CheckIfSilentMode()'
    Here's the problem, not in what you just mentioned.

  9. #9
    Nokia Developer Champion
    Join Date
    Jul 2004
    Posts
    2,015

    Re: Undefined reference...

    Why did you post your CheckStatus() function? Why instead don't you post the CheckIfSilentMode() function which is what the compiler says is the problem.
    Last edited by hotcheese; 2008-08-25 at 21:18.

  10. #10
    (Retired) Nokia Developer Admin.
    Join Date
    Jan 2006
    Location
    Michigan
    Posts
    4,664

    Re: Undefined reference...

    Quote Originally Posted by parikhnirav.aits View Post
    Code:
    TBool CMyclass::CheckStatus()
    {
         return ETrue;
    }
    Now if i call this function from any function of my CMyclass it gives error. That error i already mention in my thread.
    Check your prototype odds are you called it inline or static or something else that affects the linkage. If so then the function needs to be declared and defined in the same linkage unit or you will get an undefined error message such as you are seing when linking (make).

    Ron

    Ron

Similar Threads

  1. [moved] HELP! Phone Debug (GCCE)
    By joseph.m in forum Symbian
    Replies: 18
    Last Post: 2008-07-14, 10:42
  2. illegal use of abstract class error...
    By kannabiran.krish in forum Symbian
    Replies: 7
    Last Post: 2007-08-17, 10:11
  3. CameraApp Example 3rd Edition
    By bigbadwolf in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2007-05-28, 19:13
  4. file not found
    By praktikant in forum Symbian
    Replies: 16
    Last Post: 2007-05-09, 15:04
  5. 3rd edition: undefined reference
    By iulian_moldovan in forum Symbian
    Replies: 2
    Last Post: 2006-06-20, 14:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×