×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    254

    how can i create my own user defined library in Symbian C++

    hi all,
    i need to create an user defined library in Symbian c++.
    and use it in my projects .
    can any one suggest me how to do so

    regards
    Arun Gupta

  2. #2
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: how can i create my own user defined library in Symbian C++

    What you mean by "user defined library"?

    Anyway check this section in the SDK documents - How to build DLLs

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: how can i create my own user defined library in Symbian C++

    And of course there is an example in the SDK already: Examples\Basics\StaticDLL

  4. #4
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    254

    Re: how can i create my own user defined library in Symbian C++

    Quote Originally Posted by wizard_hu_ View Post
    And of course there is an example in the SDK already: Examples\Basics\StaticDLL
    hi wizard_hu
    i am able to create the static dll but how will i use it in the project.
    more precisely now i want to use it in my project how link it

    regards
    Arun Gupta

  5. #5
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: how can i create my own user defined library in Symbian C++

    Most of the APIs you use are ... static DLLs. You use the APIs provided by your DLL like any other, you add a LIBRARY statement to the MMP file pointing to your link library and then use the API in the project making sure to include the needed header file.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: how can i create my own user defined library in Symbian C++

    That particular example also shows the usage: you add a reference to your library into a LIBRARY line, the same way as euser.lib, avkon.lib, etc.
    Note that you have to 'freeze' a .dll project in order to get the .lib file generated
    - Carbide offers a Freeze command for the project
    - 'abld freeze' also does that in the command line
    - for development and experimenting, you can also specify EXPORTUNFROZEN keyword in the .mmp, and your import library is going to be generated even if the project is not frozen ('unfrozen').

  7. #7
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    254

    Re: how can i create my own user defined library in Symbian C++

    i used the freeze export it generated a folder bwins but when i execute the same in the command prompt inside the group i get an error like
    ERROR: EPOCROOT must be an absolute path, not containing a drive letter.

    through command prompt
    1)what should i do? to remove this


    through IDE
    2) it created the def file but how to use is still a mystery for me..

    regards
    Arun Gupta

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,672

    Re: how can i create my own user defined library in Symbian C++

    Quote Originally Posted by arungupta_2jan View Post
    i used the freeze export it generated a folder bwins but when i execute the same in the command prompt inside the group i get an error like
    ERROR: EPOCROOT must be an absolute path, not containing a drive letter.
    That message is a bit misleading, generally said you should prefer usage of 'devices' command instead of usage of 'EPOCROOT' environment variable.
    Code:
    set EPOCROOT
    from the command line sould not show anything.
    If it does,
    Code:
    set EPOCROOT=
    removes the variable.
    Then
    Code:
    devices
    should list your SDK-s, make sure that the one you are planning to use is marked as 'default'.
    If not,
    Code:
    devices -setdefault @....
    changes the default. The space and the @ are important, and you have to use the complete name, like "devices -setdefault @S60_3rd_MR:com.nokia.s60".
    2) it created the def file but how to use is still a mystery for me..
    You simply write it into the .mmp file of the other project. As already said, every .lib file you use is such an import library for .dll-s, so the usage of yours will not differ:
    Code:
    LIBRARY euser.lib // this line links with the .lib file created for euser.dll
    LIBRARY your.lib // <- so if you have your.dll, and the library creation succeeded, this line will link with its import library

Similar Threads

  1. Error loading connection when obfuscation high?
    By ejakkk in forum Mobile Java General
    Replies: 8
    Last Post: 2009-06-26, 12:54
  2. linking error
    By dakosurf in forum Symbian
    Replies: 1
    Last Post: 2008-03-27, 22:45
  3. Compilation series 60 3rd edition
    By asmobease in forum Symbian Tools & SDKs
    Replies: 32
    Last Post: 2006-09-13, 09:46
  4. Import problems carbide.c++
    By vigja in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2006-09-06, 15:37
  5. How to get User defined menu items in a form?
    By varshajohn in forum Symbian User Interface
    Replies: 3
    Last Post: 2002-11-11, 14:50

Posting Permissions

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