>> Edit article
이름
제목
패스워드
: 컴파일하는데 자꾸에러가 나네요... : 제가 간단하게...c로 gd라이브너리를 이용했어..간단한 소스를 만들었는데...컴파일에서 에러가...나네요.. : 도와주세요... : <소스.....> : #include "gd.h" : #include <stdio.h> : int main(){ : gdImagePtr im; : int black; : int white; : im = gdImageCreate(100,100); : black=gdImageColorAllocate(im, 0, 0, 0); : white=gdImageColorAllocate(im,255, 255, 255); : gdImageLine(im, 0, 0, 63, 63, white); : printf("Content-type: image/gif"); : gdImageGif(im, stdout); : gdImageDestroy(im); : return 0; : } : : <에러 ....> : /tmp/ccr2QI3o.o: In function `main': : /tmp/ccr2QI3o.o(.text+0xe): undefined reference to `gdImageCreate' : /tmp/ccr2QI3o.o(.text+0x25): undefined reference to `gdImageColorAllocate' : /tmp/ccr2QI3o.o(.text+0x45): undefined reference to `gdImageColorAllocate' : /tmp/ccr2QI3o.o(.text+0x65): undefined reference to `gdImageLine' : /tmp/ccr2QI3o.o(.text+0x8a): undefined reference to `gdImageGif' : /tmp/ccr2QI3o.o(.text+0x99): undefined reference to `gdImageDestroy' : collect2: ld returned 1 exit status : : : 이런 에러가 나네요... : 제발 자세하게 가르쳐 주세요.... gd library가 깔려있는지 확인하세요 ... ls -l /usr/lib/libgd.a 있다면 compile시에 -L/usr/lib -lgd 를 붙여 주시면 됩니다. :)
Copyleft
1999-2026 by
JSBoard Open Project
Theme Designed by
IDOO
All right reserved