linux-mips
[Top] [All Lists]

Re: compile C++ code

To: kjlin <kj.lin@viditec-netmedia.com.tw>
Subject: Re: compile C++ code
From: Jean-Christophe ARNU <jc.arnu@wanadoo.fr>
Date: 31 Aug 2001 14:38:38 -0400
Cc: linux-mips@oss.sgi.com
In-reply-to: <02b801c13203$f52ad440$056aaac0@kjlin>
References: <02b801c13203$f52ad440$056aaac0@kjlin>
Sender: owner-linux-mips@oss.sgi.com
On 31 Aug 2001 18:01:51 +0800, kjlin wrote:

> #mips-linux-gcc test.C
> /usr/lib/gcc-lib/mips-linux/egcs-2.91.66/libgcc.a(frame.o): In function 
> `decode_uleb128':
> /usr/src/redhat/BUILD/egcs-1.1.2/target-mips-linux/gcc/../../gcc/frame.c(.data+0x0):
>  undefined reference to `pthread_create'
> /usr/mips-linux/bin/ld: bfd assertion fail ../../bfd/elf32-mips.c:5123
> mips-linux-gcc: Internal compiler error: program ld got fatal signal 11
> #mips-linux-g++ test.C
> /usr/mips-linux/lib/libstdc++.so: undefined reference to `pthread_create'
> /usr/mips-linux/lib/libstdc++.so: undefined reference to `pthread_getspecific'
> /usr/mips-linux/lib/libstdc++.so: undefined reference to `pthread_once'
> /usr/mips-linux/lib/libstdc++.so: undefined reference to `pthread_key_create'
> /usr/mips-linux/lib/libstdc++.so: undefined reference to `pthread_setspecific'
> 
        It seems you should link with pthread lib : 
        #mips-linux-g++ test.C -lpthread

        I think the libgcc.a should be linked with it ... Can anyone tell us
further on that subject?
-- 
Jean-Christophe ARNU
s/w developer 
Paratronic France


<Prev in Thread] Current Thread [Next in Thread>