From: Richard Frith-Macdonald <richard@tiptree.demon.co.uk>
To: pepijn de vos <pepijndevos@yahoo.com>
Cc: "Discuss-gnustep@gnu.org" <Discuss-gnustep@gnu.org>
Sent: Wednesday, September 19, 2012 9:48 AM
Subject: Re: Converting xcodeproj to makefile
On 18 Sep 2012, at 12:01, pepijn de vos wrote:
> The workaround was just to do a normal message. Not sure what the magic was all about.
>
> It works on my Mac with GNUstep make now, and it compiles on Linux, but after I ported the test suit, I got this message:
>
> EXCEPTION: NSInvalidArgumentException GSDictionary(instance) does not recognize BSONEncode (null)
>
> That method is added to NSDictionary using a category, over here:
https://github.com/pepijndevos/bson-objc/blob/master/BSONCodec.h#L31>
> So problem one: How do I make that category work?
To make a category work, you need to get it linked/loaded in to your program ... which may mean that some code in your program needs to refer to something in the file containing the category.
eg. of the category is in a file foo.m
containing the class foo, your code could call [foo class] just so that the linker will pull that into your program ensuring that the category will eb there at runtime.
> Problem two: How do I run the rest of the tests? (those that require the Base64 encoding)
I haven't looked, but if you need to add base64 encoding/decoding support, gnustep-base already has some base64 methods as extensions in the GSMime class.