Message-Id: <199910071028.MAA02219@mailhost.uni-koblenz.de> Mime-Version: 1.0 (NeXT Mail 4.2mach_patches v148.2) Content-Type: multipart/alternative; boundary=NeXT-Mail-406506690-3 Content-Transfer-Encoding: 7bit X-Nextstep-Mailer: Mail 4.2mach_patches (Enhance 2.2) From: Markus Geimer Date: Thu, 7 Oct 1999 12:28:05 +0200 To: pgcc AT delorie DOT com Subject: pgcc and Objective-C Reply-To: pgcc AT delorie DOT com --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 gcc -o simple simple.m -lobjc -lpthread If anybody can help me, please let me know. Markus = --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 #include @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--