'lbizip'에 해당되는 글 1건

  1. 2010.05.06 gcc -lz옵션

gcc -lz옵션

programming/C++ 2010. 5. 6. 21:08 |
poc를 컴파일하는데 에러가 발생했다

#gcc poc.c -o poc
/tmp/ccKjCDpt.o(.text+0x214): In function `zflush':
: undefined reference to `deflate'
/tmp/ccKjCDpt.o(.text+0x3c7): In function `zgetch':
: undefined reference to `inflate'
/tmp/ccKjCDpt.o(.text+0x4e3): In function `do_compression':
: undefined reference to `deflateInit_'
/tmp/ccKjCDpt.o(.text+0x4fa): In function `do_compression':
: undefined reference to `inflateInit_'
collect2: ld returned 1 exit status

compress관련 라이브러리인 libzip을 링크시켜야 된단다.

아래와 같은 옵션을 사용하여 컴파일이 가능하다.

#gcc poc.c -o poc -lz




'programming > C++' 카테고리의 다른 글

wireshark 의 패킷수집절차  (0) 2010.07.17
main, _tmain, wmain  (0) 2010.04.17
CString형변환  (0) 2009.10.12
Posted by applicationlayer
: