discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Objective-C newbie programming question


From: Lele Gaifax
Subject: Re: Objective-C newbie programming question
Date: Fri, 17 Jan 2003 16:16:27 +0100

>>>>> On Fri, 17 Jan 2003 16:05:14 +0100, Dennis Leeuw <dleeuw@made-it.com> 
>>>>> said:

    DL> bash-2.05a$ gcc -c hello.m -lobjc hello.m: In function `main':
    DL> hello.m:24: warning: return type of `main' is not `int' gcc:
    DL> -lobjc: linker input file unused because linking not done

    DL> Which I don't understand, cause it says void...  And when
    DL> running the .o file I get:

    DL> bash-2.05a$ ./hello.o bash: ./hello.o: cannot execute binary
    DL> file

    DL> Could someone help me out?

It's probably more than enough just following the note in the header
of the source:

    DL> /* W.J. Antel Jr.  12/12/96 ** Compile with gnu's gcc: gcc
    DL> hello.m -lobjc */

You added the "-c" switch, that means "do only the compilation step,
producing an 'object' file ending in .o". The produced 'hello.o' is
not an executable, it needs to be linked against runtime libraries...

hth,
ciao, lele.
-- 
nickname: Lele Gaifax   | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas   | comincerò ad aver paura di chi mi copia.
email: lele@seldati.it  |               -- Fortunato Depero, 1929.





reply via email to

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