Mail Archives: djgpp/1995/10/18/05:31:02
Xref: | news-dnh.mv.net comp.os.msdos.djgpp:2721
|
Newsgroups: | comp.os.msdos.djgpp
|
Path: | news-dnh.mv.net!mv!news.sprintlink.net!newsfeed.internetmci.com!howland.reston.ans.net!ix.netcom.com!netcom.com!dgrisner
|
From: | dgrisner AT netcom DOT com (David G. Risner)
|
Subject: | Objective-C and DJGPP V2.0
|
Sender: | dgrisner AT netcom8 DOT netcom DOT com
|
Organization: | Southwestern Univ. Law Library
|
Distribution: | Global
|
Date: | Tue, 17 Oct 1995 19:13:27 GMT
|
Lines: | 78
|
To: | djgpp AT sun DOT soe DOT clarkson DOT edu
|
Dj-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Is anyone out there doing Objective-C with DJGPP version 2.0?
I would like to switch over to using version 2.0, but I'm having
problems getting a simple Objective-C program to compile.
I have compiled this C program:
#include <stdio.h>
main()
{
printf("This is a test.\n");
return (0);
}
using just: "gcc test.c".
This works fine, but the following Objective-C program doesn't work
when compiled by doing the following three step process:
gcc -o newobj.o -c newobj.m
gcc -o main.o -c main.m
gcc newobj.o main.o -lobjc
I get:
_eprintf.c(.text+0x10): undefined reference to `_iob'
_eprintf.c(.text+0x1a): undefined reference to `_iob'
Am I missing something?
Thanks,
David
----- file main.m
#include <stdio.h>
#include "objc/Object.h"
#include "newobj.h"
main()
{
id test, test2;
test = [Object new];
test2 = [NewObj new];
printf("My class is %s\n", [test name]);
printf("Class two is %s\n", [test2 name]);
[test2 printJunk];
return 0;
}
------ file newobj.h
@interface NewObj:Object
{
}
-printJunk;
@end
------ file newobj.m
#include <stdio.h>
#include "objc/Object.h"
#include "newobj.h"
@implementation NewObj
-printJunk
{
printf("Junk\n");
return self;
}
@end
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
David G. Risner dgrisner AT netcom DOT com
Southwestern University School of Law Library Los Angeles, CA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- Raw text -