Hi all,
I mistakenly sent a request to the wrong list (discuss instead of help-gnustep). Here it is again on the probably more appropriate list:
I am trying to get gnustep-make-2.7.0 to work on MacOSX Sierra. After
./configure
make
make install
and thus installing GNUstep make I try to build a minimal test app
main.m:
===================
int main (int argc, const char **argv, char** env)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *processName = [[NSProcessInfo processInfo] processName];
Controller *controller;
[NSApplication sharedApplication];
NSImage *image = [NSImage imageNamed:[NSString stringWithFormat:@"%@.tiff", processName]];
if (image) [NSApp setApplicationIconImage:image];
controller = [[Controller alloc] init];
[NSApp setDelegate:controller];
[pool release];
return NSApplicationMain (argc, argv);
}
Controller.m:
=====================
#import <AppKit/AppKit.h>
#import "Controller.h"
@implementation Controller
@end
and get
admins-iMac:Test ahoesch$ make messages=yes
This is gnustep-make 2.7.0. Type 'gnumake print-gnustep-make-help' for help.
Running in gnustep-make version 2 strict mode.
Making all for app Test...
gcc -m32 -shared-libgcc -pthread -fexceptions -fnext-runtime -o /Build/Test/Test.app/Contents/MacOS/Test \
/Build/Test/obj/Test.obj/Controller.m.o /Build/Test/obj/Test.obj/main.m.o -F/Library/Frameworks/ -framework AppKit -framework Foundation -lobjc -lm
clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_NSApplication", referenced from:
objc-class-ref in main.m.o
"_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
objc-class-ref in main.m.o
"_OBJC_CLASS_$_NSImage", referenced from:
objc-class-ref in main.m.o
"_OBJC_CLASS_$_NSObject", referenced from:
_OBJC_CLASS_$_Controller in Controller.m.o
"_OBJC_CLASS_$_NSProcessInfo", referenced from:
objc-class-ref in main.m.o
"_OBJC_CLASS_$_NSString", referenced from:
objc-class-ref in main.m.o
"_OBJC_METACLASS_$_NSObject", referenced from:
_OBJC_METACLASS_$_Controller in Controller.m.o
"_objc_msgSendSuper2", referenced from:
-[Controller dealloc] in Controller.m.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gnumake[3]: *** [/Build/Test/Test.app/Contents/MacOS/Test] Error 1
gnumake[2]: *** [internal-app-run-compile-submake] Error 2
gnumake[1]: *** [Test.all.app.variables] Error 2
make: *** [internal-all] Error 2
I have also tried to build the app manually on the command line, now using clang instead of gcc and -arch i386 instead of -m32:
cd /Build/Test; \
/Library/GNUstep/Makefiles/mkinstalldirs ./obj/Test.obj/
/Library/GNUstep/Makefiles/mkinstalldirs /Build/Test/Test.app/Contents/MacOS
cd /Users/ahoesch/Development/Test
clang Controller.m -c \
-MMD -MP -DNeXT_Foundation_LIBRARY=1 -DNeXT_GUI_LIBRARY=1 -DNeXT_RUNTIME=1 -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-nonfragile-abi -D_NONFRAGILE_ABI -pthread -dynamic -fno-common -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g -O2 -fnext-runtime -arch i386 -Wno-parentheses -Wno-import -I. -I/usr/local/include/ -F/Library/Frameworks/ \
-o /Build/Test/obj/Test.obj/Controller.m.o
clang main.m -c \
-MMD -MP -DNeXT_Foundation_LIBRARY=1 -DNeXT_GUI_LIBRARY=1 -DNeXT_RUNTIME=1 -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -fobjc-nonfragile-abi -D_NONFRAGILE_ABI -pthread -dynamic -fno-common -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g -O2 -fnext-runtime -arch i386 -Wno-parentheses -Wno-import -I. -I/usr/local/include/ -F/Library/Frameworks/ \
-o /Build/Test/obj/Test.obj/main.m.o
clang -arch i386 -shared-libgcc -pthread -fexceptions -fnext-runtime -o /Build/Test/Test.app/Contents/MacOS/Test \
/Build/Test/obj/Test.obj/Controller.m.o /Build/Test/obj/Test.obj/main.m.o -F/Library/Frameworks/ -framework AppKit -framework Foundation -lobjc -lm
but still get the same error!?
admins-iMac:Test ahoesch$ clang -arch i386 -shared-libgcc -pthread -fexceptions -fnext-runtime -o /Build/Test/Test.app/Contents/MacOS/Test /Build/Test/obj/Test.obj/Controller.m.o /Build/Test/obj/Test.obj/main.m.o -F/Library/Frameworks/ -framework AppKit -framework Foundation -lobjc -lm
clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_NSApplication", referenced from:
objc-class-ref in main.m.o
"_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
objc-class-ref in main.m.o
"_OBJC_CLASS_$_NSImage", referenced from:
objc-class-ref in main.m.o
"_OBJC_CLASS_$_NSObject", referenced from:
_OBJC_CLASS_$_Controller in Controller.m.o
"_OBJC_CLASS_$_NSProcessInfo", referenced from:
objc-class-ref in main.m.o
"_OBJC_CLASS_$_NSString", referenced from:
objc-class-ref in main.m.o
"_OBJC_METACLASS_$_NSObject", referenced from:
_OBJC_METACLASS_$_Controller in Controller.m.o
"_objc_msgSendSuper2", referenced from:
-[Controller dealloc] in Controller.m.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am clueless! This used to work on earlier versions of MacOSX. Any idea?
Thanks a lot in advance!!
Andreas