[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NSObject errors compiling Objective-C programs
From: |
Mehul N. Sanghvi |
Subject: |
NSObject errors compiling Objective-C programs |
Date: |
Mon, 10 Oct 2005 02:41:02 -0400 |
User-agent: |
Thunderbird 1.4 (Windows/20050908) |
OK, so I've got gnustep-base and gnustep-make installed. I'm trying to
follow the code as given on the "Objective-C for Beginners" website
which is refrenced from the gnustep.org website.
I am getting the following error when I try to compile the simple
fractions example:
prompt% make
Making all for objc_program fraction_driver...
Compiling file fraction_driver.m ...
Compiling file fraction.m ...
Linking objc_program fraction_driver ...
./shared_obj/fraction.o(.data.rel+0xf4): undefined reference to
`__objc_class_name_NSObject'
collect2: ld returned 1 exit status
make[1]: *** [shared_obj/fraction_driver] Error 1
make: *** [fraction_driver.all.objc-program.variables] Error 2
What am I doing wrong ? I'm just trying to compile a simple
Objective-C program, using the GNUstep make system.
cheers,
mehul
---- begin header file ----
#import <Foundation/Foundation.h>
@interface Fraction: NSObject
{
int numerator;
int denominator;
}
/* rest of code snipped */
---- end header file ----
==== GNUmakefile ====
include $(GNUSTEP_MAKEFILES)/common.make
# Space seperated list of executables to be built
OBJC_PROGRAM_NAME = fraction_driver
fraction_driver_OBJC_FILES = fraction_driver.m fraction.m
include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/objc.make
==== GNUmakefile ends ====
~~~~ GNUmakefile.preamble ~~~~~
ADDITIONAL_OBJCFLAGS += -Wall -Wno-import #-fnext-runtime
~~~~ GNUmakefile.preamble ~~~~~
--
Mehul N. Sanghvi
email: mehul.sanghvi@gmail.com