The .h files do not need to be included in the GNUmakefile; you just have to include them in your .m files with a line like: #import "MyHeader.h"
typically I use the line:
$(APP_NAME)_OBJC_FILES = $(wildcard *.m)
in my GNUmakefile, which will compile all .m (implementation files) in the current directory.
It may help to check out these examples:
and the docs at
On 2011-11-14, at 3:02 PM, Thanasis Petridis wrote:
I have a new problem.
How can I compile in objective-C when I have the implementation code, the class main and the interface code in different files ?
For example I would like to have the main class in the file "test.m", and the interface in the file Fraction.h and the implementation in the file Fraction.m .
What should I have to write inside the GNUmakefile file?
On Tue, Nov 8, 2011 at 12:21 AM, Thanasis Petridis <address@hidden>
Thanks for the answers Adam and Richard!
On Mon, Nov 7, 2011 at 4:54 PM, Richard Frith-Macdonald <address@hidden>
This is where you went wrong ... you can't really build code trying to use a compiler directly because there are various options, include directories, and libraries which need to be used.
On 6 Nov 2011, at 19:59, Thanasis Petridis wrote:
> Hello. My name is Thanasis.
> First of all sorry for my poor english.
> Secondly, if this is the wrong mailing list or if there is a solution for my problem, just tell me which is the correct mailing list or where is the answer.
> I have a PC running on Windows 7 and I want to start programming apps for iOS. So I figured out that I should start from learning the Objective-C language.
> So I searched in the Internet and I found that I can program Objective-C on windows 7 through GNUstep. I install in the directory c:\GNUstep the following 3 setups
> I have created a file hello.m in the folder c:\new
> I started the shell application
> I wrote c:\new
> and then I wrote g++ hello.m
You should use gnustep-make to automate the build process and fill in all those options for you.
See http://www.gnustep.it/nicola/Tutorials/WritingMakefiles/index.html for a good starting point.
Help-gnustep mailing list