bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tools-windows-msvc runtime error


From: loserist
Subject: tools-windows-msvc runtime error
Date: Sun, 16 Jul 2023 10:12:03 +0800 (GMT+08:00)

I know this is an error usually caused by null pointers, but my code has been tested to be fine under linux. When I compile and run my program on windows using tools-windows-msvc provided by gnustep, I get this error, and I suspect that it is caused by one of gnustep's own libraries on windows, specifically the objc library, but I can't do anything about it and I don't know how to fix it, so I'm putting this question to you so I'm sending this problem back to you for fixing. Finally, thanks for the replies and I'll post my code below at the end!



#import <Foundation/Foundation.h>

@interface SayHello : NSObject

- (void)greet;

@end

@implementation SayHello

- (void)greet {

NSLog(@"Hello GnuStep");

}

@end

int main() {

NSLog(@"*************************"); // Ok

SayHello *obj = [[SayHello alloc] init]; // Oops!

NSLog(@"###########################"); // No

[obj greet]; // No

NSLog(@"##########################"); // No

}


reply via email to

[Prev in Thread] Current Thread [Next in Thread]