2013-10-10 2 views
0

내가 GraphicsMagick C++ 라이브러리에 의존하는 작은 유틸리티 프로그램을 구축하기 위해 노력하고있어하지만 라이브러리에 링크 할 때 나는 다음과 같은 오류가 발생했습니다에 링크 할 수 없습니다 :GraphicsMagik

make all-recursive 
make[1]: Entering directory `/home/ale/sample' 
Making all in src 
make[2]: Entering directory `/home/ale/sample/src' 
g++ -g -O2 -o mysample mysample-a.o -L/usr/local/lib -lexiv2 -L/usr/local/lib -lGraphicsMagick++ -lGraphicsMagick  
/usr/local/lib/libGraphicsMagick.a(magick_libGraphicsMagick_la-png.o): In function `png_put_data': 
/home/ale/Downloads/GraphicsMagick-1.3.18/coders/png.c:1171: undefined reference to `png_get_io_ptr' 
/usr/local/lib/libGraphicsMagick.a(magick_libGraphicsMagick_la-png.o): In function `PNGWarningHandler': 
/home/ale/Downloads/GraphicsMagick-1.3.18/coders/png.c:1357: undefined reference to `png_error' 
/home/ale/Downloads/GraphicsMagick-1.3.18/coders/png.c:1361: undefined reference to `png_get_error_ptr' 
/usr/local/lib/libGraphicsMagick.a(magick_libGraphicsMagick_la-png.o): In function `PNGErrorHandler': 
/home/ale/Downloads/GraphicsMagick-1.3.18/coders/png.c:1338: undefined reference to `png_get_error_ptr' 
/usr/local/lib/libGraphicsMagick.a(magick_libGraphicsMagick_la-png.o): In function `png_get_data': 
/home/ale/Downloads/GraphicsMagick-1.3.18/coders/png.c:1060: undefined reference to `png_get_io_ptr' 
/home/ale/Downloads/GraphicsMagick-1.3.18/coders/png.c:1076: undefined reference to `png_warning' 
/home/ale/Downloads/GraphicsMagick-1.3.18/coders/png.c:1077: undefined reference to `png_error' 
/home/ale/Downloads/GraphicsMagick-1.3.18/coders/png.c:1067: undefined reference to `png_warning' 
/usr/local/lib/libGraphicsMagick.a(magick_libGraphicsMagick_la-png.o): In function `png_write_raw_profile': 
/home/ale/Downloads/GraphicsMagick-1.3.18/coders/png.c:6243: undefined reference to `png_malloc' 
/home/ale/Downloads/GraphicsMagick-1.3.18/coders/png.c:6253: undefined reference to `png_malloc' 
/home/ale/Downloads/GraphicsMagick-1.3.18/coders/png.c:6254: undefined reference to `png_malloc' 
/home/ale/Downloads/GraphicsMagick-1.3.18/coders/png.c:6281: undefined reference to `png_set_text' 
/home/ale/Downloads/GraphicsMagick-1.3.18/coders/png.c:6282: undefined reference to `png_free' 
/home/ale/Downloads/GraphicsMagick-1.3.18/coders/png.c:6283: undefined reference to `png_free' 

이유는/usr에있는 라이브러리를 않습니다/local/lib는 GraphicsMagick 소스 코드 (빌드하고 설치 한 것)를 나타 냅니까?

답변

0

오류는 libpng도 링크해야한다고 말합니다.

디버깅 기호가있는 그래픽 마티 크를 작성했기 때문에 매우 유용한 소스 코드 관련 오류가 있습니다. 릴리스 빌드 (또는 디버그 빌드에서 디버깅 기호를 제거하는 경우)는 정의되지 않은 함수 이름 만 표시되며 사용 위치의 소스 코드 참조는 표시되지 않습니다.