🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Undefined reference?

#394
From: Mathieu Chouinard
Date: Wed, 14 Mar 2001 14:06
34 lines
2743 bytes
Niko wrote:

> On Tue, 13 Mar 2001 17:04:27 -0600 you wrote:
>>Libraries (and static libraries in particular) need to be
>>mentioned on the command line _after_ code that uses them.
> 
> Thanks Artie for this fast answer, its better now, but I get the same
> kind of output with different names... and this time I cannot put
> anything else after! is it a problem of installation of libobj?
> 
> -------
> $gcc -Wno-import printer.m main.m -o test -lobjc
> 
> /usr/lib/gcc-lib/i486-suse-linux/2.95.2/libobjc.a(thr-posix.o): In
> function `__objc_init_thread_system':
> thr-posix.o(.text+0x41): undefined reference to `pthread_key_create'
> /usr/lib/gcc-lib/i486-suse-linux/2.95.2/libobjc.a(thr-posix.o): In
> function `__objc_thread_detach':
> thr-posix.o(.text+0x75): undefined reference to `pthread_create'
> /usr/lib/gcc-lib/i486-suse-linux/2.95.2/libobjc.a(thr-posix.o): In
> function `__objc_thread_set_data':
> thr-posix.o(.text+0x104): undefined reference to `pthread_setspecific'
> /usr/lib/gcc-lib/i486-suse-linux/2.95.2/libobjc.a(thr-posix.o): In
> function `__objc_thread_get_data':
> thr-posix.o(.text+0x120): undefined reference to `pthread_getspecific'
> /usr/lib/gcc-lib/i486-suse-linux/2.95.2/libobjc.a(thr-posix.o): In
> function `__objc_mutex_trylock':
> thr-posix.o(.text+0x1f1): undefined reference to
> `pthread_mutex_trylock'
> collect2: ld returned 1 exit status
> ------
> 
try gcc -Wno-import printer.m main.m -o test -lobjc -lpthread
Mathieu
Technical Details
Message-ID: <ITKr6.4499$pP5.71947@wagner.videotron.net>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!64.71.136.253.MISMATCH!news!news.he.net!feed2.onemain.com!feed1.onemain.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sunqbc.risq.qc.ca!wesley.videotron.net!wagner.videotron.net.POSTED!not-for-mail
References: <699tat8g64nd10muf5cih1irqvl25ndcm5@4ax.com> <3AAEA77B.F3F25991@bga.com> <pjauat8l2hh0u1ve2elkjfdqsrm1vfpte8@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-14 06:06:07 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!64.71.136.253.MISMATCH!news!news.he.net!feed2.onemain.com!feed1.onemain.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sunqbc.risq.qc.ca!wesley.videotron.net!wagner.videotron.net.POSTED!not-for-mail
From: Mathieu Chouinard <chouimat@videotron.ca>
Subject: Re: Undefined reference?
Newsgroups: comp.lang.objective-c,gnu.gcc.help
Followup-To: comp.lang.objective-c
References: <699tat8g64nd10muf5cih1irqvl25ndcm5@4ax.com> <3AAEA77B.F3F25991@bga.com> <pjauat8l2hh0u1ve2elkjfdqsrm1vfpte8@4ax.com>
Lines: 34
User-Agent: KNode/0.5
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
Message-ID: <ITKr6.4499$pP5.71947@wagner.videotron.net>
Date: Wed, 14 Mar 2001 09:06:31 -0500
NNTP-Posting-Host: 24.201.109.93
X-Complaints-To: abuse@videotron.net
X-Trace: wagner.videotron.net 984578664 24.201.109.93 (Wed, 14 Mar 2001 09:04:24 EST)
NNTP-Posting-Date: Wed, 14 Mar 2001 09:04:24 EST