discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Gnustep and frameworks


From: Yen-Ju Chen
Subject: Re: Gnustep and frameworks
Date: Mon, 21 May 2007 15:05:25 -0700

On 5/21/07, andy.somogyi <andy.somogyi@gmail.com> wrote:
Hello

Are the Mac / NextStep style frameworks (a directory with a shared
lib and header files) supported in Gnustep / Linux?

Is there support for using them via the gcc -framework option and for
creating them via the gnustep make?

Reason why I ask is that:
a: I think frameworks are a VERY nice way of creating and using
shared libs.
b: We are working on a number of applications on the Mac side and we
want them to be portable to Gnustep / Linux,
    and these make heavy use of shared frameworks.

 You can create framework with gnustep-make on GNUstep and Mac.
 You just use FRAMEWORK_NAME and framework.make in GNUmakefile.
 In term of using frameworks, I remember GNU GCC does not support
frameworks well.
 So on Mac, you can use -framework with Apple GCC, but not on GNUstep
with GNU GCC.
 Fortunately, after you install a framework on GNUstep,
 the framework is also exported as libraries.
 This is how I do in GNUmakefile using UnitKit as an example:

ifeq ($(FOUNDATION_LIB), apple)
       OrganizeKit_OBJC_LIBS += -framework UnitKit
else
       OrganizeKit_LDFLAGS += -lUnitKit
endif

 Well, I may not use _OBJC_LIBS and _LDFLAGS correctly,
 but the point is that I can use -framework on Mac and -l on GNUstep
for the same framework.
 It works fine so far.

 If you want to find the resources in the framework,
 you can still use NSBundle to find the framework first (probably
-bundleForClass:),
 then get the correct path and retrieve the resources.
 It works both on Mac and GNUstep.

 Yen-Ju


thanks


_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep





reply via email to

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