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: Wolfgang Lux
Subject: Re: GNUstep make static library question
Date: Thu, 28 May 2009 17:41:10 +0200

Andreas Höschler wrote:

Hi all,

I have a framework that depends on a library. This frameworks is needed by a bundle that is loaded dynamically into our application. When I start the application and load the bundle 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)

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.



reply via email to

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