🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.objective-c
Article #391

Re: Undefined reference?

#391
From: Arthur H. Gold
Date: Tue, 13 Mar 2001 23:04
37 lines
2160 bytes
Niko wrote:
> 
> Hie,
> 
> I have to learn Objective C but I have a problem with compiling...
>  - I use GCC v2.95.2 provided by Suse Linux 7.0  with GCC-objc v2.95.2
> provided by the ftp site of suse, both are rpms (installed with
> default paths I suppose).
> - I have checked : both libraries are located at
> /usr/lib/gcc-lib/i486-suse-linux/2.95.2/*
> - I have tried to compile a very simple program : an object oriented
> "hello World" found on dekorte.com (called "printer") I have just
> added the flag  -Wno-import .
> - I have found a similar message posted two years ago in gnu.gcc.help
> which explains the same problem : but there is not any answer.
> 
> Please help me I don't know why I get the following output :
> 
> $ gcc -lobjc -Wno-import printer.m main.m -o test
Make that:
gcc -Wno-import printer.m main.m -o test -lobjc

Libraries (and static libraries in particular) need to be
mentioned on the command line _after_ code that uses them.

HTH,
--ag

> 
[errors snipped]

-- 
Artie Gold, Austin, TX  (finger the cs.utexas.edu account
for more info)
mailto:agold@bga.com or mailto:agold@cs.utexas.edu
--
Clone Bernie!
Technical Details
Message-ID: <3AAEA77B.F3F25991@bga.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!howland.erols.net!newsfeed.skycache.com!Cidera!feed1.realtime.net
References: <699tat8g64nd10muf5cih1irqvl25ndcm5@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,30b34a1e2f9e1e50
X-Google-Attributes: gid11318c,public
X-Google-Thread: 1111a3,30b34a1e2f9e1e50
X-Google-Attributes: gid1111a3,public
X-Google-ArrivalTime: 2001-03-13 15:04:03 PST
Message-ID: <3AAEA77B.F3F25991@bga.com>
Date: Tue, 13 Mar 2001 17:04:27 -0600
From: "Arthur H. Gold" <agold@bga.com>
Organization: UTCS OOPS Group
X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.17-21mdk i686)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.lang.objective-c,gnu.gcc.help
Subject: Re: Undefined reference?
References: <699tat8g64nd10muf5cih1irqvl25ndcm5@4ax.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: max5-50.ip.realtime.net
X-Trace: 13 Mar 2001 17:11:25 -0600, max5-50.ip.realtime.net
Lines: 37
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!howland.erols.net!newsfeed.skycache.com!Cidera!feed1.realtime.net