Mail Archives: pgcc/1999/10/07/12:00:23
--NeXT-Mail-406506690-3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi!
First of all, I'm NOT on the mailing list, so send your answers to
mgm AT uni-koblenz DOT de. Now the problem:
I've tried to compile a simple Objective-C program with pgcc-2.95.1 and got
the following error message:
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/pgcc-2.95.1/libobjc.a(encoding.o):
In function `objc_layout_structure_next_member':
encoding.o(.text+0xb10): undefined reference to `target_flags'
collect2: ld returned 1 exit status
The "standard" gcc-2.95.1 works fine. I've attached my program (which is not
very useful [An attachment was originally included here];-)[An attachment
was originally included here]). Try it with
gcc -o simple simple.m -lobjc -lpthread
If anybody can help me, please let me know.
Markus
[An attachment was originally included here]
--NeXT-Mail-406506690-3
Content-Type: multipart/mixed; boundary=NeXT-Mail-1938440023-4
Content-Transfer-Encoding: 7bit
--NeXT-Mail-1938440023-4
Content-Type: text/enriched; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi!
First of all, I'm NOT on the mailing list, so send your answers to
mgm AT uni-koblenz DOT de. Now the problem:
I've tried to compile a simple Objective-C program with pgcc-2.95.1 and
got the following error message:
=
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/pgcc-2.95.1/libobjc.a(encoding.o):
In function `objc_layout_structure_next_member':
encoding.o(.text+0xb10): undefined reference to `target_flags'
collect2: ld returned 1 exit status
The "standard" gcc-2.95.1 works fine. I've attached my program (which is
not very useful `;-) `). Try it with
<nofill>
gcc -o simple simple.m -lobjc -lpthread
If anybody can help me, please let me know.
Markus
</nofill>=
--NeXT-Mail-1938440023-4
Content-Type: application/octet-stream; name=simple.m; x-unix-mode=0644
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=simple.m
#include <stdio.h>
#include <objc/Object.h>
@interface MyObject : Object
{
int value;
}
-(id) initWith:(int)aValue;
-(id) print;
@end
@implementation MyObject
-(id) initWith:(int)aValue {
[super init];
value = aValue;
return self;
}
-(id) print {
printf("value: %d\n", value);
return self;
}
@end
int main(void) {
MyObject *a;
a = [[MyObject alloc] initWith:15];
[a print];
[a free];
return 0;
}
--NeXT-Mail-1938440023-4--
--NeXT-Mail-406506690-3--
- Raw text -