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 19:59:09 +0000


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. 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?

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.





reply via email to

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