|
From: | Ivan Vučica |
Subject: | Re: Emacs Anyone? |
Date: | Fri, 3 Mar 2017 14:41:13 +0000 |
Hi Richard
On 03/03/17 10:38, Richard Frith-Macdonald wrote:
For fake main to work, you have to include a GNUstep header file (eg Foundation/NSObject.h) in the source file where main() is used.
So typically that won't work if you are writring library code which is to be called from some application that's not GNUstep aware (ie where the source code you have never calls main()).
In that situation you should be able to call GSInitializeProcess() to perform the setup before doing anything else.
thank you for the information. Ineed, I cannot include directly the header from main, however I added a hook function which calls it as first function in main.c.
#ifdef NS_IMPL_GNUSTEP
extern void gs_initialize_process (int argc, char** argv, char** envp)
{
GSInitializeProcess(argc, argv, envp);
}
#endif
I get now this:
2017-03-03 12:57:16.148 bootstrap-emacs[26596:145924880] autorelease called without pool for object (0x8f7c650) of class NSMethodSignature in thread <NSThread:
0x8b2a310>{name = (null), num = 145924880}
2017-03-03 12:57:16.162 bootstrap-emacs[26596:145924880] autorelease called without pool for object (0x911efd0) of class NSMutableDataMalloc in thread <NSThread: 0x8b2a310>{name = (null), num = 145924880}
Is other initialization missing? Since the code works when fake main is not needed and there are no autorelease pool issues, my guess is yes, but what?
Riccardo
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnustep
[Prev in Thread] | Current Thread | [Next in Thread] |