discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Troubles with GNUstep Make


From: Torli Birnbauer
Subject: Re: Troubles with GNUstep Make
Date: Tue, 17 Mar 2009 17:47:45 -0400

Thank you Nicola!

On Tue, 2009-03-17 at 20:56 +0000, Nicola Pero wrote:
Hi Torli

make sure your new GNUmakefile looks like

include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = WriteStr2File
WriteStr2File_OBJC_FILES = source.m
include $(GNUSTEP_MAKEFILES)/tool.make

(note how you have to replace LogTest twice) ;-)

If you don't replace the second instance of 'LogTest', gnustep-make  
won't find any files to link
for your tool, and so it will create a new tool from zero object  
files.  Then, the main() function
will be missing ;-)

I know it can be confusing at first - the idea is that TOOL_NAME  
provides the list of tools to compile,
and then, for each of them, you need a xxx_OBJC_FILES variable listing  
the files belonging to that
tool.

Hope this clarifies things :-)

Thanks and good luck

>
> Now create the makefile, again using your favourite text editor, and  
> save it in the same project directory with the filename GNUmakefile.
>
> include $(GNUSTEP_MAKEFILES)/common.make
> TOOL_NAME = LogTest
> LogTest_OBJC_FILES = source.m
> include $(GNUSTEP_MAKEFILES)/tool.make
>
> If you look at the makefile above you will notice the two lines that  
> tell the make utility to build a tool with the filename LogTest from  
> the Objective-C source file source.m. You could copy and modify this  
> makefile for later projects you may have: just change the tool name  
> and list the new source files.
>
> The trouble is that changing the line {{ TOOL_NAME = LogTest }} to  
> something else, make does not work. I get the following:
>
> $ make
> This is gnustep-make 2.0.2. Type 'make print-gnustep-make-help' for  
> help.
> Making all for tool WriteStr2File...
> Linking tool WriteStr2File ...
> /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/crt1.o: In  
> function `_start':
> (.text+0x18): undefined reference to `main'
> collect2: ld returned 1 exit status
> make[1]: *** [obj/WriteStr2File] Error 1
> make: *** [WriteStr2File.all.tool.variables] Error 2
> igor@kosi:~/work/prgming/obj-c/projs/bp02/wr2file
> $
>
> It looks as if certain names like {{ LogTest, simple, ...}} were pre- 
> compiled into GNUstep make. Is this a known undocumented problem, or  
> will building GNUstep Make from source solve this problem?
>
> Thank you in advance,
> Torli
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> http://lists.gnu.org/mailman/listinfo/discuss-gnustep


reply via email to

[Prev in Thread] Current Thread [Next in Thread]