discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dirty Hack!!!(WAS: Re: [Q] How a method in a category added


From: S.J.Chun
Subject: Re: Dirty Hack!!!(WAS: Re: [Q] How a method in a category added
Date: Mon, 14 Jul 2003 12:30:39 +0900 (KST)

  Hmm, then there's no better method.... 
  If so, how abut generating this kind of code automatically inserted into the 
framework headers? Or should
  the developer include this code by himself?
  
    ----- Original Message -----
    From: Adam Fedor <fedor@doc.com>
    To: "S.J.Chun" <chunsj@embian.com>
    Cc: discuss-gnustep@gnu.org,"?)"@mail.embian.com
    Sent: Sun, 13 Jul 2003 11:16:07 -0600
    Subject: Re: Dirty Hack!!!(WAS:  Re: [Q] How a method in a category added
  
    
    
    S.J.Chun wrote:
    > Hi,
    > 
    > To solve linking problem (I've found that even if I explicitly set the 
linker flag so that it link a framework library XXX,
    > windows does not link it, if there's no symbolic linkage...), I have to 
specify in the header like following...
    > 
    > #ifndef _EDCommonFramework_Linking_H_
    > #define _EDCommonFramework_Linking_H_
    > 
    > @interface NSFramework_EDCommon : NSObject
    > @end
    > 
    > static inline void __EDCommonFramework_linking (void) {
    >     NSFramework_EDCommon *frmInst = [NSFramework_EDCommon alloc];
    > }
    > 
    > #endif
    > 
    > With this, linker always link specified framework library. Any more 
better solution? Thanks in advance.
    > 
    
    I've seen this happend when linking libraries statically, but I don't
    have any better solution. Another idea is to put some dummy function in
    the framework, like
    
    --- linking.m ----
    #include <Foundation/Foundation.h>
    #include "AppKit/AppKit.h"
    
    void __objc_gui_linking(void)
    {
      [GSFontInfo class];
    }
    
    
    And then make sure you call that function from your main program.
    
    
    
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]