Quoting Andrew Pinski <[EMAIL PROTECTED]>: > > On Jul 7, 2005, at 12:57 AM, [EMAIL PROTECTED] wrote: > > > > > No really, I'm just trying to compile Objective C code. But when I use > > -libobjc, > > I get: > > > > /usr/bin/ld: cannot find -libobjc > > collect2: ld returned 1 exit status > > > > I thought that "libobjc" was included in gcc. So, I found the > > following link > > that says that -libobjc is the Objective C class library . . . > > > > http://www.cs.rochester.edu/u/mccallum/libobjects/ > > > > SO, what should I do to compile Objective C code? I have being trying > > to use > > "-lm" and "-libobjc" or "-libobjects". > > -lobjc > > > -- Pinski > >
Thanks, but then I get: [EMAIL PROTECTED] read_input]# gcc main.m read_input.m -lobjc -lm /usr/bin/ld: warning: type and size of dynamic symbol `__objc_class_name_Object' are not defined /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libobjc.so: undefined reference to `xmalloc' /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libobjc.so: undefined reference to `xfree' /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libobjc.so: undefined reference to `xmalloc_atomic' /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libobjc.so: undefined reference to `xcalloc' /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libobjc.so: undefined reference to `xrealloc' collect2: ld returned 1 exit status Alex