I am running Windows 10, with GNUstep. I have been trying to compile my AI.m file into a .exe so I could give it to my friend, but whenever I compile it, I get an error with the .exe file itself. I have compiled it both through the the Windows command prompt as well as the GNU Shell prompt. Either way I compile the program, it will succeed in making the file, but when I try to run it, it will launch errors. The errors it gives me are:
The procedure entry point _gxx_personality_v0 could not be located in the dynamic link library C:\GNUstep\bin\libicui18n46.dll
The procedure entry point _gxx_personality_v0 could not be located in the dynamic link library C:\GNUstep\bin\libicuuc46.dll
But if I compile the program through the GNU shell with a make file, then run the program through /obj/AI.exe while still in the GNU shell, it will load fine.
I also thought maybe it was my computer that was having an issue, so I put the .exe onto a flash drive and moved it to my laptop. When I tried to run the program on my laptop, it gave the error:
The program can't start because gnustep-base-1_24.dll is missing from your computer. Try reinstalling the program to fix this problem.
So what is causing it to only work after being done through the make file, and only via the shell following the make file? Any way to fix these errors so I can run the file?
Here is the code included in the AI.m file:
#include "stdio.h"
#include "stdlib.h"
#include "Foundation/Foundation.h"
int main(void) {
NSAutoreleasePool *myPool = [[NSAutoreleasePool alloc] init];
char * rawinput = malloc(sizeof(char));
system("cls");
fflush(stdout);
printf("Hello, my name is (Not Yet Available), and I am an in progress AI.");
//printf("\nCurrently, I have no features, but will be working soon.");
//printf("\nI can't wait until I am better able to assist you.");
fflush(stdout);
printf("\nCurrently I can only get the date and time for you of your current location.");
printf("\nWould like me to get one of them for you?");
printf("\n");
fflush(stdout);
scanf( "%s" , rawinput );
NSString *input = [NSString stringWithCString:rawinput encoding:1];
if ([input caseInsensitiveCompare:@"yes"]==NSOrderedSame) {
printf("Great! Let me pull it for you right now.");
fflush(stdout);
//TODO: Pull the weather
} else if([input caseInsensitiveCompare:@"no"]==NSOrderedSame) {
printf("I understand. I hope I was of service to you.");
fflush(stdout);
} else {
printf("Sorry, I can only understand if you say 'yes' or 'no' right now.");
printf("\nIf you want to try again, please restart the program.");
fflush(stdout);
}
[myPool drain];
return EXIT_SUCCESS;
}
EDIT: So I went into my environmental variables for my computer, and moved the ones regarding GNUstep to the top of the list, before everything else, and now the program will open fine. So something there was causing an issue about which .dll to use from where. But how would I get this to run on another computer that doesn't have GNUstep installed on it?