Hi
A couple of things:
Firstly, the programme you attached isn't really a programme - its
just the interface definition for a class. You still need to add a
"main()" method (like normal C) and an implementation. The error
you're receiving is because your main.m lacks a main() function, which
on Windows gets converted to WinMain() by the mingw runtime. If you're
not familiar with Objective-C I suggest poking around the internet for
tutorial.
Secondly, GNUstep's makefile system is generally the best way to
compile programmes. Add file called GNUmakefile to the directory
containing main.m, and put the following in it:
include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = test
test_OBJC_FILES = main.m
include $(GNUSTEP_MAKEFILES)/tool.make
You should then be able to type just "make" to compile.
Also take a look at the GNUstep Makefile manual for more details about
the GNUstep makefile system (which is a little bit unique compared to
other makefile systems).
Cheers
Chris
On 23/01/2009, at 3:45 PM, Gupta, Arjit (HP Labs India) wrote:
Hi,
I took the gnu set from the link http://www.gnustep.org/experience/Windows.html
and just installed it. I am attaching the program which I was
compiling so just to it and please help me out if possible.
My compile command is : gcc -o main main.m
Hope this helps you to clear my doubts .
Thanks
Arjit
-----Original Message-----
From: Christopher Armstrong [mailto:[email protected]]
Sent: Friday, January 23, 2009 3:38 AM
To: Gupta, Arjit (HP Labs India); [email protected]
Subject: Re: Gnustep-dev Digest, Vol 74, Issue 16
Hi
Could you please post:
* a copy of the source code file you were compiling
* a copy of the GNUmakefile you were using to compile with
* the command that you executed the compiler with in order to
compile the program
Cheers
Chris
On 23/01/2009, at 4:01 AM, Gupta, Arjit (HP Labs India) wrote:
I have been getting an error
/mingw/lib/libmingw.a<main.o>:main.c:<.text+0xbd>:Undefined refrence
to nm...@16
Collect2 :Id returned 1 exit status
I am not able to compile a simple objective C class main the main.
--------
Christopher Armstrong
[email protected]
<fraction.h><fraction.m><main.m>
--------
Christopher Armstrong
[email protected]
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep