discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Troubles with GNUstep Make


From: Richard Frith-Macdonald
Subject: Re: Troubles with GNUstep Make
Date: Tue, 17 Mar 2009 21:09:22 +0000


On 17 Mar 2009, at 20:32, Torli Birnbauer wrote:

On Tue, 2009-03-17 at 19:59 +0000, Richard Frith-Macdonald wrote:

On 17 Mar 2009, at 19:45, Torli Birnbauer wrote:

> I have recently installed GNUstep binaries with Synaptic Package
> Manager on my Ubuntu system, and subsequently started to study the
> Base Programming Manual, where I came across the following:
>
>
> 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.
> 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?

Neither ...  there's no evidence of any problem with gnustep-make
there. What it looks like is that there is a problem with your source
code.  The makefile is trying to link the tool WriteStr2File and has
found that the source code (whatever that is in your case) does not
contain the required  'main()' function.

You can do 'make messages=yes' to get more information about exactly
what it's doing.

Richard, this is a very interesting hypothesis you've brought up. I Know to you it must look credible, but it is a total hogwash to me! If I change the setting of {{ TOOL_NAME }} variable from {{ TOOL_NAME = WriteStr2File }} back to {{ TOOL_NAME = LogTest }} or to {{ TOOL_NAME = simple }}, as can be found in the "Make Utility" documentation on page http://www.gnustep.org/developers/documentation.html under the subtitle "1.2 Structure of a Makefile" the compilation and linking finishes flawlessly.

All that shows is that you have got a main() in the source files for LogTest and no main() in the source files for WriteStr2File

Most likely that means you changed 'TOOL_NAME = LogTest' to 'TOOL_NAME = WriteStr2File' but forgot to change 'LogTest_OBJC_FILES = source.m' to 'WriteStr2File_OBJC_FILES = source.m'

In that case you are telling it to build the tool 'WriteStr2File', but telling it that the source files list (WriteStr2File_OBJC_FILES) is empty. If there are no source files, then of course main() is not found in any of the source files, so you get the linker error saying that.






reply via email to

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