솔라리스/리눅스

compile -static 적용시 err

지니아부지 2011. 6. 7. 16:49
bs(s3c2440)에서 hpi app 컴파일시 에러 발생..

arm-none-linux-gnueabi-gcc -march=armv4t -mcpu=arm920t -static -o hpitest hpi.c
/tmp/ccc5qqiX.o: In function `sigioService':
hpi.c:(.text+0x14): undefined reference to `pthread_mutex_lock'
hpi.c:(.text+0x30): undefined reference to `pthread_cond_signal'
hpi.c:(.text+0x38): undefined reference to `pthread_mutex_unlock'
/tmp/ccc5qqiX.o: In function `HPIBurstRead':
hpi.c:(.text+0x9a8): undefined reference to `pthread_mutex_lock'
hpi.c:(.text+0xa0c): undefined reference to `pthread_cond_wait'
hpi.c:(.text+0xa58): undefined reference to `pthread_mutex_unlock'
collect2: ld returned 1 exit status
root@shubuntu:/home/sanghee/project/kctc/hpi_/app#
root@shubuntu:/home/sanghee/project/kctc/hpi_/app#
root@shubuntu:/home/sanghee/project/kctc/hpi_/app# arm-none-linux-gnueabi-gcc -march=armv4t -mcpu=arm920t -o hpitest hpi.c
root@shubuntu:/home/sanghee/project/kctc/hpi_/app#

* -static 은 안된단 왜??? 맞나?
-> Just "-lpthread" won't work when you link with "-static".

-> thread도 static으로 컴팔을 해놓는다 ??


'솔라리스/리눅스' 카테고리의 다른 글

mtd util download  (0) 2011.06.08
busybox  (0) 2011.06.07
linux cmd grep  (0) 2011.06.07
linux cmd cp  (0) 2011.06.03
사용자 메모리 읽기와 쓰기-리눅스  (0) 2011.05.13