discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Troubles with GNUstep Make


From: David Chisnall
Subject: Re: Troubles with GNUstep Make
Date: Wed, 18 Mar 2009 14:14:45 +0000

Richard's already answered your question, but some quick additional comments for future reference:

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

$ make
This is gnustep-make 2.0.2. Type 'make print-gnustep-make-help' for help.
Making all for tool WriteStr2File...
Linking tool WriteStr2File ...

This is your clue. The tool is being linked, but nothing is being compiled first. That is the reason you get this:

/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

The linker is running, because it is linking all of the libraries, but it is not linking anything other than the libraries.

If you run into this kind of issue again, try doing:

make messages=yes

This will show you the commands that make is running. Doing this, you would see that the linker command does not contain any .o files and so you could see that the .m file is not being compiled or linked.

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?

I usually write:

${TOOL_NAME}_OBJC_FILES =

instead of:

TheRealToolName_OBJC_FILES =

This makes it easier to reuse the GNUmakefile for another project. A few of the Étoilé GNUmakefiles (Mélodie, for example) take this even further and use lines like this:

$(APP_NAME)_OBJC_FILES = $(wildcard *.m)

If you do this, then you just need to set APP_NAME when you reuse the makefile.

David



reply via email to

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