|Subject:||GNUstep make, linking to frameworks in the app wrapper|
|Date:||Fri, 3 Mar 2023 18:11:54 +0100|
I use GNUstep make to build frameworks, bundles and apps on MacOSX. The frameworks used to the installed in /Library/Frameworks. Unfortunately this no longer works on newer MacOS X systems. Installing the framework in the home directory of users works
make GNUSTEP_INSTALLATION_DIR="/Users/ahoesch" install
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_USER_ROOT)
and the framework is even be found by the app without further ado which is great.
However, I want to go a step further and install the framework in the Resources folder of the app wrapper
cd /Users/ahoesch/A/TestFW <--- project directory of the framework
make GNUSTEP_INSTALLATION_DIR="/Build/TestApp3/TestApp3.app/Contents/Resources" install
to mimic what xCode.app does (everything in a self-contained app wrapper). The framework ends up in
but is of course not found by the app. Starting the app gives
dyld: Library not loaded: TestFW.framework/TestFW
Referenced from: /Build/TestApp3/TestApp3.app/Contents/MacOS/TestApp3
Reason: image not found
Trace/BPT trap: 5
Now that I have moved the framework I cannot even build the app anymore because it can't find the header.
cd <app project dir>
retina:TestApp3 ahoesch$ make install
This is gnustep-make 2.4.0. Type 'make print-gnustep-make-help' for help.
Making all for app TestApp3...
Compiling file DocumentController.m ...
clang: warning: /Build/TestFW/TestFW.framework/Headers: 'linker' input unused
DocumentController.m:2:9: fatal error: 'TestFW/Person.h' file not found
1 error generated.
I tinkered around with)
ADDITIONAL_INCLUDE_DIRS += /Build/TestFW/TestFW.framework/Headers
ADDITIONAL_LIB_DIRS += /Build/TestApp3/TestApp3.app/Contents/Resources
in the GNUmakefile of the app project but did not manage to find the correct settings!? :-(
How can I make the app to build (find the headers of the framework) and finally how can I make the app to find TestFW.framework in its application wrapper?
If building the app with the framework installed in a standard location (/Library/Frameworks) and then remove the framework from this location (move it into the app wrapper) I get the above mentioned "image not found" eror.
otool -L /Build/TestApp3/TestApp3.app/Contents/MacOS/TestApp3
TestFW.framework/TestFW (compatibility version 0.0.0, current version 1.0.0)
One approach would certainly be to get rid of GNUstep make and use xCode instead for this. But I would like to stick to GNUstep make if possible!? Is there a way to make the app look into the app wrapper for libs and frameworks?
Thanks a lot in advance,
|[Prev in Thread]||Current Thread||[Next in Thread]|