×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    18

    Linking Static DLL with another Static DLL

    Hi All

    I am facing a problem in Linking one static DLL with another static DLL.

    I explain in detail as it is little bit complex

    I prepared one (First) static DLL which has one class. Whose sole purpose is to provide the pointer of several different classes.

    I Explain with the Example
    Let there is 3 Classes A, B, C having certain different functionality.
    Now is First Static DLL has a Cpp File name First.cpp which contain one class whose objective is to create the object of the class A, B and C and return the pointer to the object to the outside world who uses the First static DLL.

    Now in second static dll, functionality’s of the classes of First dll are to used through the available pointer to those classes.

    While preparing the second static DLL, I include the lib file of the first static dll and the header files of the classes A, B and C.

    And now when we make the second static dll, then we get the linking error Unresolved symbol ClassName::Function1Name(void)
    For Example Like
    Unresolved symbol B::Func1(void)

    We analyzed these errors and reach to the conclusion that this linking error comes with those functions which play with the memory. No Linking Error comes with the GETTER type functions of class A,B and C.

    Above Linking Problem was resolved when we add the classname.o (B.o) file to the second static dll.
    Adding the Object Code File to the second static DLL directly hopefully is not the right solution

    Can you tell me where i go wrong ?

    Regards
    Shishir

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,545

    Re: Linking Static DLL with another Static DLL

    Just to verify your use of terms: When you say "static DLL", do you really mean to say "static interface DLL", or are you really referring to a "static library", and not a DLL at all (because there is no such thing as a "static dynamic link library").

    For someone to help you, it might also be easier if you post the .mpp files you use to build the executables and also any and all build commands.

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

    Re: Linking Static DLL with another Static DLL

    I don't understand in which DLL A,B and C are? You say the first dll creates pointers to these classes but you also say the first dll only has one class?
    If A,B and C are in another DLL include that in the second Dll's .mmp and make sure their functions are EXPORT_C/IMPORT_C

  4. #4
    Registered User
    Join Date
    Dec 2005
    Posts
    18

    Re: Linking Static DLL with another Static DLL

    Yes by "static DLL" I mean "static interface DLL"
    Application is build on Symbian OS V7.0 and CodeWarrior v3.1.
    Build is prepared through the CodeWarrior Build Command

    A, B and C are the Part of First DLL.
    There is one more Class in First DLL which is actually exposing to the outside world(Interface). For example say whose name is "Main" whose member functions create the Objects of the Class A, B and C and return the Pointer to the Objects of Class A, B and C.
    These member functions of the class "Main" are declared in "Main.h" with the prefix IMPORT_C and the defination of the member functions of the class "Main" in "Main.cpp" are prefixed with EXPORT_C

    Shishir

  5. #5
    Registered User
    Join Date
    Dec 2005
    Posts
    18

    Re: Linking Static DLL with another Static DLL

    Still Waiting for the Reply

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

    Re: Linking Static DLL with another Static DLL

    Are A,B and C's functions declared using IMPORT_C/EXPORT_C?

  7. #7
    Registered User
    Join Date
    Dec 2005
    Posts
    18

    Re: Linking Static DLL with another Static DLL

    NO, Functions of the Class A, B and C are not declared using IMPORT_C/EXPORT_C.

    Shishir

Similar Threads

  1. Static Interface DLL - Plolymorphic ?
    By stopin in forum Symbian
    Replies: 3
    Last Post: 2008-06-11, 11:06
  2. Static Linking of a DLL
    By ghioldi in forum Symbian
    Replies: 9
    Last Post: 2006-01-24, 03:17
  3. Replies: 3
    Last Post: 2005-04-11, 20:00
  4. Replies: 0
    Last Post: 2003-04-24, 07:46
  5. some problems with label
    By vivienzhung in forum Mobile Java General
    Replies: 1
    Last Post: 2002-10-21, 09:52

Posting Permissions

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