
Some parts of this message have been removed.
Learn more about Nabble's
security policy.
Hi,
I'm a newcomer to Objective-C. I have Windows XP.
I have downloaded and installed the followings:
gnustep-system-0.23.0-setup
gnustep-core-0.23.1-setup
gnustep-devel-1.0.0-setup
Here is mu first program from a tutorial which is very simple:
#include <stdio.h>
#import <stdio.h>
#import <Foundation/NSObject.h>
@interface MyClass:NSObject{
int a;
int b;
}
-(void) setvara : (int) x;
-(void) setvarb : (int) y;
-(int) add;
@end
@implementation MyClass
-(void) setvara :(int) x{
a=x;
}
-(void) setvarb :(int) y{
b=y;
}
-(int) add{
return a+b;
}
@end
int main(int argc, char *argv[]){
MyClass *class = [[MyClass alloc]init];
[class setvara : 5];
[class setvarb : 6];
printf("Sum is : %d",[class add]);
[class release];
return ;
}
When I use:
gcc -o filename filename.h -I /c/gnustep/gnustep/system/library/headers -L /c/gnustep/gnustep/system/library/libraries
to compile the file I receive the following errors:
undefined reference to ___objc_class_name_NSObject
undefined reference to ___objc_exec_class
1- Could you kindly tell me how I can tackle this problem
2- How can I set any environmental variables so that I can avoid typing
-I /c/gnustep/gnustep/system/library/headers -L /c/gnustep/gnustep/system/library/libraries
every time.
Thank you very much for your assistance in advance.
Ashkan
Windows Live: Keep your friends up to date
with what you do online.
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@...
http://lists.gnu.org/mailman/listinfo/discuss-gnustep