I was hoping for somebody else to answer this. There are different subclasses that provide the implementation for NSString, most importantly GSString. Within an Obj-C application NSString in itself is never instantiated. The problem you are facing is that your non Obj-C code may try to instantiate an NSString object. Just stick to the [[NSString alloc] initXXXX] pattern or get your strings from one of the factory methods.
Hope this helps, Fred > Am 23.03.2024 um 20:03 schrieb Boris D. <[email protected]>: > > Hello, > In NSString.m, -length is defined as follows: > > - (NSUInteger) length > { > [self subclassResponsibility: _cmd]; > return 0; > } > > My code links with the gnustep-base library but is not compiled from > Objective-C source. Am I supposed to use a subclass of NSString instead > of NSString directly? Which class provides this implementation? > >
