×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    27

    Undefined symbol: 'class CRepository * CRepository::NewLC(class TUid)

    Hi,

    I am using Qt with standalone Symbian^3 sdk 0.9 and Carbide.c++. I am trying to use the centralrepository in my application using the following code:

    Code:
    #include "test001.h"
    #include <centralrepository.h>
    #include <dclcrkeys.h> 
    
    test001::test001(QWidget *parent)
        : QMainWindow(parent)
    {
    	ui.setupUi(this);
    	
    	CRepository* cRepository = CRepository::NewLC( KCRUidDCLLogs );
    }
    but I am getting this error:

    1291630582885 Undefined symbol: 'class CRepository * CRepository::NewLC(class TUid) (?NewLC@CRepository@@SAPAV1@VTUid@@@Z)' test001 Unknown C/C++ Problem

    Can somebody offer some help? Do I need a plug in for this? Thanks
    I followed the instructions in this page to set up my environment. I am using ActivePerl-5.8.9.827-MSWin32-x86-291969.
    Last edited by duwaji; 2010-12-06 at 10:38.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: Undefined symbol: 'class CRepository * CRepository::NewLC(class TUid)

    You have to add the library to your project. I think you will find some libraries in the .pro file already, list centralrepository.lib amongst them.

    Note that there are Qt boards on this site, I have started to move some of your threads there. You can find the Qt boards if you scroll the discussion main page (http://discussion.forum.nokia.com) a bit downwards.

  3. #3
    Registered User
    Join Date
    Dec 2010
    Posts
    27

    Re: Undefined symbol: 'class CRepository * CRepository::NewLC(class TUid)

    Hi Wizard,

    I do have centralrepository added in my .pro file. Any other reason you can think of?

    Thanks

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,692

    Re: Undefined symbol: 'class CRepository * CRepository::NewLC(class TUid)

    The symbol exists, you can find it in C:\Nokia\devices\Nokia_Symbian3_SDK_v0.9\epoc32\release\winscw\udeb\centralrepository.lib with a file viewer. But I do not know what you should take care of in case of modifying and re-building a Qt, that is why the thread is moved here.

  5. #5
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Undefined symbol: 'class CRepository * CRepository::NewLC(class TUid)

    You probably need a library (added to your LIBS statement in the .pro file).

    Try "LIBS += -lcentralrepository".

  6. #6
    Registered User
    Join Date
    Dec 2010
    Posts
    27

    Re: Undefined symbol: 'class CRepository * CRepository::NewLC(class TUid)

    Thanks. That fixed the problem.

    I had LIBS += centralrepository and when I changed it to LIBS += -lcentralrepository the problem is fixed.

    Thanks

  7. #7
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Undefined symbol: 'class CRepository * CRepository::NewLC(class TUid)

    Yeah, the reason is lost in the mists of history, but lib/dll files need to be prefixed with "-l". Library directories are prefixed with "-L". And, oddly, you put no suffix on the lib file name, but if it's a dll instead you suffix it with ".lib".

Similar Threads

  1. Undefined symbol: 'class
    By TAHIR in forum Symbian
    Replies: 1
    Last Post: 2010-03-02, 04:39
  2. Undefined symbol: 'class CAknChoiceList
    By somnathbanik in forum Symbian
    Replies: 9
    Last Post: 2009-08-12, 13:11
  3. undefined symbol on RAPssession class
    By nimco in forum Symbian Networking & Messaging (Closed)
    Replies: 6
    Last Post: 2009-04-29, 13:14
  4. Undefined symbol: class CMdaAudioPlayerUtility
    By max_gudluck in forum Symbian
    Replies: 4
    Last Post: 2009-01-01, 11:32
  5. Undefined symbol: 'class CRepository - Why??
    By regis.melo in forum Symbian
    Replies: 4
    Last Post: 2008-02-21, 13:56

Posting Permissions

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