Hi, 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: ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-examples-1.3.0.tar.gz and the docs at http://www.gnustep.org/resources/documentation/Developer/Make/Manual/make_toc.html --Eric On 2011-11-14, at 3:02 PM, Thanasis Petridis wrote: > Hello again > > 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? > > Thanks. > > On Tue, Nov 8, 2011 at 12:21 AM, Thanasis Petridis <[email protected]> > wrote: > Thanks for the answers Adam and Richard! > > > On Mon, Nov 7, 2011 at 4:54 PM, Richard Frith-Macdonald > <[email protected]> wrote: > > 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 > > > > -gnustep-msys-system-0.28.1-setup > > -gnustep-core-0.28.0-setup > > -gnustep-devel-1.3.0-setup > > > > 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 > > 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. > 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 > [email protected] > https://lists.gnu.org/mailman/listinfo/help-gnustep
_______________________________________________ Help-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-gnustep
