Reputation: 841
I am new to Objective-C and I am using GNUstep to develop it on Windows. Each time I try to create a file, it compiles successfully but when I try to run the .exe I get a following error:
procedure entry point gzdirect could not be located in dynamic link library zlib1.dll
I don't know if this is caused by a system setting, how I compiled it, or from my source code but here is the compile command:
C:\gnustep\bin\gcc -o hello.exe hello.m -I /GNUstep/GNUstep/System/Library/Headers -L /GNUstep/GNUstep/System/Library/Libraries -std=c99 -lobjc -lgnustep-base -fconstant-string-class=NSConstantString
And here is the hello world source code:
#include <Foundation/Foundation.h>
int main()
{
NSLog(@"Hello, world!");
return 0;
}
Can anybody help me figure out what is causing this error?
Upvotes: 1
Views: 499
Reputation: 437381
The easiest way to build projects is to use a GNUmakefile
text file (no extension) using your text editor:
include $(GNUSTEP_MAKEFILES)/common.make TOOL_NAME = Hello Hello_OBJC_FILES = hello.m include $(GNUSTEP_MAKEFILES)/tool.make
Then you can compile your program by just running make
at the GNUstep "Shell" command line.
See Building Your First Objective-C Program.
For example:
Upvotes: 1