add -lpthread when compiling




At 2012-01-12 19:52:11,"Hamid Reza Khaleghzadeh" <[email protected]> wrote:
>Hi all,
>
>I have written a PThread application. When I compile it with
>alphaev67-unknown-linux-gnu-gcc cross compiler, I encounter with
>following errors If I use -static option. Could you tell me how I can
>solve it?
>
>/tmp/ccWXeXT8.o: In function `worker':
>(.text+0x118): undefined reference to `pthread_barrier_wait'
>/tmp/ccWXeXT8.o: In function `worker':
>(.text+0x308): undefined reference to `pthread_barrier_wait'
>/tmp/ccWXeXT8.o: In function `worker':
>(.text+0x500): undefined reference to `pthread_barrier_wait'
>/tmp/ccWXeXT8.o: In function `worker':
>(.text+0x6fc): undefined reference to `pthread_barrier_wait'
>/tmp/ccWXeXT8.o: In function `main':
>(.text+0x880): undefined reference to `pthread_barrier_init'
>/tmp/ccWXeXT8.o: In function `main':
>(.text+0x8fc): undefined reference to `pthread_create'
>/tmp/ccWXeXT8.o: In function `main':
>(.text+0x960): undefined reference to `pthread_create'
>/tmp/ccWXeXT8.o: In function `main':
>(.text+0x9c4): undefined reference to `pthread_create'
>/tmp/ccWXeXT8.o: In function `main':
>(.text+0xa28): undefined reference to `pthread_create'
>/tmp/ccWXeXT8.o: In function `main':
>(.text+0xa90): undefined reference to `pthread_join'
>collect2: ld returned 1 exit status
>
>-- 
>Hamid Reza Khaleghzadeh
>_______________________________________________
>gem5-users mailing list
>[email protected]
>http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to