|
From: | Jürgen Lorenz Simon |
Subject: | Re: Internal Error: The private GNUstep function to establish the argv and environment was not called |
Date: | Fri, 3 Jun 2005 12:53:19 +0200 |
On 3 Jun 2005, at 04:13, Sheldon Gill wrote:
Jürgen Lorenz Simon wrote:Hi again,just in case I ran a debugger on the deployment machine to extract a stacktrace:GNUSTEP Internal Error: The private GNUstep function to establish the argv and environment variables was not called. Please report the error to address@hidden Maybe it helps to localise the problem.For some reason, either that the code isn't executing +load or (more likely) there is an issue with GS_FAKE_MAIN.The easy way around this is: main( int argc, char **argv, char **env) { <your variable declarations> NSProcessInfo *thisProcess; thisProcess = [NSProcessInfo initializeWithArguments: argv count: argc environment: env]; <rest of your code> } although you might get it to work simply by using: thisProcess = [NSProcessInfo processInfo];The hard way is to work out why the fake main/load-initialize isn't working right.
The first variant is invalid. The signature for the NSProcessInfo initialise call is:
+ (void) initializeWithArguments: (char**)argv count: (int)argc environment: (char**)env;
(from core/base/Headers/Foundation/NSProcessInfo.h) and thus the above call is impossible.
Apart from that, I have already tried that approach by trying this: #include <unistd.h> ... int main() { // first thing: extern char** environ;[NSProcessInfo intitializeWithArguments:argv count:argc environment:environ];
... }and it didn't work out. I'm afraid its not that. If you have more ideas, anything, please keep
them coming. Thanks so far!
[Prev in Thread] | Current Thread | [Next in Thread] |