Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Apr 1998 17:26:31 -0800 (PST)
From:      "Jason K. Fritcher" <fritcher@calweb.com>
To:        John Birrell <jb@cimlogic.com.au>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: pthread question
Message-ID:  <Pine.BSF.3.95q.980402172341.17926A-100000@web2.calweb.com>
In-Reply-To: <199804020543.PAA12640@cimlogic.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2 Apr 1998, John Birrell wrote:
> Jason K. Fritcher wrote:
> > Tried it, but it didn't make any difference. If it was the problem, it
> > should have given me errors about _pthread_create being unreferenced also.
> > It is really puzzling why it is finding the _pthread_create function, but
> > not the one above.
> 
> I link a lot of things static, but I always issue separate commands
> for compile and link.

I gave this a try, using a combo of gcc and ld, it got rid of the
_pthread_join error, but now it is giving this error, which I have never
seen before, since I normally just let gcc do both the compile and the
link. Here is what I did.

[jkf@outreach:~/src/thread]$ gcc -g -D_THREAD_SAFE -o blah.o -c blah.c
[jkf@outreach:~/src/thread]$ ld -Bstatic /usr/lib/crt0.o blah.o -lc_r
blah.c:11: Undefined symbol `___main' referenced from text segment

Does it normally look for ___main? I always thought it was just _main, or
__main. Never seen it use three _'s for main before.

--------------------------------------------------------------------------
Jason K. Fritcher                                    Sr. Technical Support
fritcher@calweb.com                               Calweb Internet Services
http://www.calweb.com/                                        916-641-9320
--------------------------------------------------------------------------
   Bits/KeyID    Date        Fingerprint
   2048/C6663B59 1997/07/11  D3678FFC53D4EA7E  19329F41812F0F58


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.980402172341.17926A-100000>