×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    Porint ANSI C static dll to symbian static dll

    source code is written in ANSI C, and compile to static dll

    I want it to be symbian static dll.
    How to do that?

    just recompile it,and in mmp file writing dll tpye?
    LIBRARY euser.lib estlib.lib
    STATICLIBRARY ecrt0.lib

    but where is entry(E32dll), where EXPORT_C.

    I know how to port ANSI C exe to symbian exe, but not dll.
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Porint ANSI C static dll to symbian static dll

    Quote Originally Posted by xhsoldier
    but where is entry(E32dll), where EXPORT_C.

    I know how to port ANSI C exe to symbian exe, but not dll.
    Just add one .cpp file with Content as given below

    #include <e32def.h>
    #include <e32uid.h>

    // The E32Dll() entry point function

    GLDEF_C TInt E32Dll(TDllReason /*aReason*/)
    {
    return(KErrNone);
    }

    and use the EXPORT_C in cpp file for those functions where you want to export the functions that can be used in calling application/dlls.

  3. #3
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    Re: Porint ANSI C static dll to symbian static dll

    Quote Originally Posted by skumar_rao
    Just add one .cpp file with Content as given below

    #include <e32def.h>
    #include <e32uid.h>

    // The E32Dll() entry point function

    GLDEF_C TInt E32Dll(TDllReason /*aReason*/)
    {
    return(KErrNone);
    }

    and use the EXPORT_C in cpp file for those functions where you want to export the functions that can be used in calling application/dlls.
    Note: my source code is c not c++; How to do this?
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Porint ANSI C static dll to symbian static dll

    As you can See the E32Dll is a C function. and For Export it does not Matter it is a C or C++

  5. #5
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    Re: Porint ANSI C static dll to symbian static dll

    Quote Originally Posted by skumar_rao
    As you can See the E32Dll is a C function. and For Export it does not Matter it is a C or C++

    Hi,


    I do as you said, the dll can be compiled successfully, but I changeTDllReason to TInt, because the TDllReason is not defined.

    but my exe(also c) can not find the function in the dll, "undifined symbol"
    add EXPORT_C in every function in .c file.

    why?
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

  6. #6
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Porint ANSI C static dll to symbian static dll

    What about the .h files. Does it say IMPORT

  7. #7
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    Re: Porint ANSI C static dll to symbian static dll

    Quote Originally Posted by skumar_rao
    What about the .h files. Does it say IMPORT
    yes, I also add INPORT
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

Similar Threads

  1. GoogleIt
    By deepika.mangla in forum Symbian
    Replies: 5
    Last Post: 2011-05-28, 11:04
  2. Static Interface DLL - Plolymorphic ?
    By stopin in forum Symbian
    Replies: 3
    Last Post: 2008-06-11, 11:06
  3. Creating a Symbian DLL using Metrowers CodeWarrior
    By fjvwing in forum Symbian Tools & SDKs
    Replies: 8
    Last Post: 2004-06-18, 13:52
  4. Replies: 0
    Last Post: 2004-05-07, 11:45
  5. Replies: 0
    Last Post: 2003-04-24, 07:46

Posting Permissions

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