Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Nov 2002 17:32:35 +0000
From:      Jonathon McKitrick <jcm@FreeBSD-uk.eu.org>
To:        freebsd-chat@freebsd.org, freebsd-questions@freebsd.org
Subject:   Unresolved reference compiling Objective-C ??
Message-ID:  <20021108173235.GA82490@dogma.freebsd-uk.eu.org>

next in thread | raw e-mail | index | archive | help

Hi all,
I just compiled a 'hello world' in objective c on a box with gcc but no
GNUstep.  I'm using the compile command as I found it in the tutorial.

Any idea what I did wrong?

thanks,
jonathon


dogma:...files/programs/objc> gcc -lobjc main.m printer.m -o testme
main.m: In function `main':
main.m:4: warning: return type of `main' is not `int'
/tmp/ccgeR5Vc.o: In function `main':
/tmp/ccgeR5Vc.o(.text+0x28): undefined reference to `objc_get_class'
/tmp/ccgeR5Vc.o(.text+0x33): undefined reference to `objc_msg_lookup'
/tmp/ccgeR5Vc.o(.text+0x4b): undefined reference to `objc_msg_lookup'
/tmp/ccgeR5Vc.o(.text+0x74): undefined reference to `objc_msg_lookup'
/tmp/ccgeR5Vc.o(.text+0xa3): undefined reference to `objc_msg_lookup'
/tmp/ccgeR5Vc.o(.text+0xd0): undefined reference to `objc_msg_lookup'
/tmp/ccgeR5Vc.o: In function `global constructors keyed to main':
/tmp/ccgeR5Vc.o(.text+0xff): undefined reference to `__objc_exec_class'
/tmp/ccBL0eLu.o: In function `_i_Printer__init':
/tmp/ccBL0eLu.o(.text+0x26): undefined reference to `objc_msg_lookup_super'
/tmp/ccBL0eLu.o(.text+0x4d): undefined reference to `objc_msg_lookup'
/tmp/ccBL0eLu.o: In function `_i_Printer__print':
/tmp/ccBL0eLu.o(.text+0xc6): undefined reference to `objc_msg_lookup'
/tmp/ccBL0eLu.o: In function `global constructors keyed to printer.m5B2iAd':
/tmp/ccBL0eLu.o(.text+0x11f): undefined reference to `__objc_exec_class'
/tmp/ccBL0eLu.o(.rodata+0x8): undefined reference to
`__objc_class_name_Object'
dogma:

NOTE: Please CC me, as I am not currently subscribed.  Thanks.

jm
-- 
My other computer is your windows box.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021108173235.GA82490>