discuss-gnustep
[Top][All Lists]
Advanced

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

Re: GNUstep make static library question


From: Andreas Höschler
Subject: Re: GNUstep make static library question
Date: Thu, 28 May 2009 20:58:57 +0200

Hi all,

I am still struggling to get a bundle referencing a framework referencing a library to work on MacOSX using GNUstep make. I have done the following:

        rm -rf /opt/GNUstep
        cd /usr/src/core/make
./configure --prefix=/opt/GNUstep --enable-import --enable-absolute-install-pathes
        make
        make install
        chmod a+w /opt/GNUstep

and then as a normal user

        . /opt/GNUstep/System/Library/Makefiles/GNUstep.sh
        cd /home/ahoesch/Development/MacOSX/FrontBaseOnMac/FBCAccess
        make clean
        make install
        
        cd /home/ahoesch/Development/MacOSX/FrontBaseOnMac/FBAccess
        make clean
        make install
        
        cd /home/ahoesch/Development/MacOSX/SmartObjectsPro/SOFrontBaseBundle
        make clean
        make install

otool -L /Library/SmartObjects/Bundles/SOFrontBaseBundle.bundle/SOFrontBaseBundle

FBAccess.framework/FBAccess (compatibility version 0.0.0, current version 1.0.0) SRAppKit.framework/SRAppKit (compatibility version 0.0.0, current version 1.0.0) SRDesign.framework/SRDesign (compatibility version 0.0.0, current version 1.0.0) SREnterprise.framework/SREnterprise (compatibility version 0.0.0, current version 1.0.0) SRFoundation.framework/SRFoundation (compatibility version 0.0.0, current version 1.0.0) SRObjects.framework/SRObjects (compatibility version 0.0.0, current version 1.0.0) SRQuery.framework/SRQuery (compatibility version 0.0.0, current version 1.0.0) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 663.97.0) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 462.7.0) libFBCAccess.dylib.1 (compatibility version 0.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 63.0.0)

What am I missing? libFBCAccess.dylib.1 has no absolute path and when I try to load the bundle in an application I get

2009-05-28 17:02:30.854 SOObjectBrowser[3299] bundlePath
2009-05-28 17:02:30.862 SOObjectBrowser[3299] *** -[NSBundle load]: Error loading code /Library/SmartObjects/Bundles/SOFrontBaseBundle.bundle/ SOFrontBaseBundle for bundle /Library/SmartObjects/Bundles/SOFrontBaseBundle.bundle, error code 0 (link edit error code 0, error number 2 (dyld: /Applications/SOObjectBrowser.app/SOObjectBrowser can't open library: libFBCAccess.dylib.1 (No such file or directory, errno = 2)

Building a static library would probably be the best solution for my case but I don't know how the GNUstep makefile has to look like for that. I also tried to create symbolic links to /usr/lib

cd /Library/Libraries
ln -s libFBCAccess.dylib /usr/lib/libFBCAccess.dylib
ln -s libFBCAccess.dylib.1 /usr/lib/libFBCAccess.dylib.1
ln -s libFBCAccess.dylib.1.0.0 /usr/lib/libFBCAccess.dylib.1.0.0

but this did not help either! :-(

libFBCAccess is the library. OK, obviously I built a dynamic library.

[jupiter:/Library/FrontBase/lib] root# ls /Library/Libraries/
libFBCAccess.dylib libFBCAccess.dylib.1 libFBCAccess.dylib.1.0.0

The GNUmakefile for this library looks as follows:

include $(GNUSTEP_MAKEFILES)/common.make
GNUSTEP_BUILD_DIR = /Build/FBCAccess
ifeq ($(FOUNDATION_LIB), apple)
   GNUSTEP_INSTALLATION_DIR = /
else
   GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
endif
LIBRARY_NAME = libFBCAccess
libFBCAccess_HEADER_FILES = rsa.h FBCInitialize.h ...
libFBCAccess_HEADER_FILES_INSTALL_DIR = FBCAccess
libFBCAccess_OBJC_FILES =
libFBCAccess_C_FILES = FBCDbNames.c bn_word.c ...
ADDITIONAL_LIB_DIRS +=
ADDITIONAL_INCLUDE_DIRS +=  -DMacOSX
ADDITIONAL_OBJCFLAGS += -Wno-parentheses -DMacOSX
include $(GNUSTEP_MAKEFILES)/library.make

How can I force GNUstep make to create a static library instead? I assume this will solve the above problem.

Thanks a lot in advance,

  Andreas

I don't know how to build a static library (Nicola certainly will answer that question), but I think the problem with your dynamic library is simply that it is lacking the full install path. I guess you didn't configure gnustep-make with --enable-absolute-install-paths did you?

Wolfgang

P.S.: In case you don't know, you can check the install path of a library with otool -L. Try
  otool -L /Library/Libraries/libFBCAccess.dylib.1
The second line of output should show the full path of the library. Ditto for the bundle:
  otool -L /Library/SmartObjects/Bundles/SOFrontBaseBundle.bundle
should show the full path to the library.

Hints are greatly appreciated!

Thanks,

  Andreas





reply via email to

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