2011-01-10 11 views
4

Visual Studio 2010의 C++ 프로그램에서 LibTiff를 사용하려고합니다. ftp://ftp.remotesensing.org/pub/libtiff에서 tiff-3.9.2.zip을 다운로드했습니다. LibTiff를 테스트하려면 누군가가 Visual Studio로 libtiff를 가져와 Fax2Tiff 도구를 빌드하는 방법을 단계별로 알려줄 수 있다면 좋을 것입니다.Visual Studio 2010에서 LibTiff 사용

너무 많은 파일들이 있으므로 완전히 혼란 스럽습니다. 이미 수행 한 어떤

:

1)라는 새 빈 Win32 콘솔 응용 프로그램 프로젝트를 만든 "TiffTest"는 tiff-3.9.2.zip에서 폴더 "libtiff"에 복사

2) 프로젝트 폴더

4)에 파일 "fax2tiff.c을"복사 프로젝트 폴더

3

)는 프로젝트

0에 해당 파일을 추가alt text

5) 추가로 "libtiff"folter의 이름이 변경 폴더

6

)를 포함 추가 파일 "tif_config.vc.h"와 "tiffconf.vc.h"을 "tif_config.h"와 "tiffconf.h"

7) 컴파일하려고 시도했습니다.

이것은 실제로 작동하지 않습니다. 오류 메시지를 없애기 만하면 새로운 오류 메시지가 발생합니다. 누구든지 libtiff를 작동시키는 방법을 말해 줄 수 있습니까?

정말 도움이 필요합니다 ...

정말 고마워요!

+0

바이너리를 다운로드하는 것이 더 좋을지도 모릅니다. 이 링크를 사용해 보셨습니까? 설치 지침도 있습니다 : http://gnuwin32.sourceforge.net/packages/tiff.htm – BeeBand

+1

다음 번에 오류 목록의 스크린 샷을 만듭니다. –

+0

libtiff의 기본 만 있으면 nuget의 패키지를 사용할 수 있습니다! 이렇게하면 시작을 더 쉽게 할 수 있습니다. – HEvTH

답변

3

가 나는 정적 라이브러리로 libtiff를 구축하는

  • 더 나은 것 같아요.
  • 는 또한 라이브러리

로 연결하는 콘솔 응용 프로그램으로 fax2tiff 구축, 당신은 당신이 라이브러리의 버전에 사용할 파일 - 메모리 관련 파일의 버전을 결정해야합니다. 파일 및 메모리 관련 파일에는 Unix, DOS 및 Windows 스타일 버전이 있습니다.

fax2tiff의 경우 Windows 버전 getopt.cgetopt.h 파일이 필요할 수 있습니다. wingetopt.hwingetopt.cfound on koders.com

이 방법을 사용하여 libtiff-3.9.4 및 tiff2pdf를 성공적으로 사용할 수 있습니다.

Btw, libtiff 버전 3.9.4는 3.x 분기에서 가장 최근 버전입니다.

아래는 내 LibTiff.vcxproj의 일부입니다. Visual Studio 2010을 사용하여 Windows에서 libtiff를 빌드하는 데 필요한 파일을 보여줍니다.

<ItemGroup> 
    <ClInclude Include="t4.h" /> 
    <ClInclude Include="tiff.h" /> 
    <ClInclude Include="tiffconf.h" /> 
    <ClInclude Include="tiffio.h" /> 
    <ClInclude Include="tiffiop.h" /> 
    <ClInclude Include="tiffvers.h" /> 
    <ClInclude Include="tif_config.h" /> 
    <ClInclude Include="tif_dir.h" /> 
    <ClInclude Include="tif_fax3.h" /> 
    <ClInclude Include="tif_predict.h" /> 
    <ClInclude Include="uvcode.h" /> 
    </ItemGroup> 
    <ItemGroup> 
    <ClCompile Include="tif_aux.c" /> 
    <ClCompile Include="tif_close.c" /> 
    <ClCompile Include="tif_codec.c" /> 
    <ClCompile Include="tif_color.c" /> 
    <ClCompile Include="tif_compress.c" /> 
    <ClCompile Include="tif_dir.c" /> 
    <ClCompile Include="tif_dirinfo.c" /> 
    <ClCompile Include="tif_dirread.c" /> 
    <ClCompile Include="tif_dirwrite.c" /> 
    <ClCompile Include="tif_dumpmode.c" /> 
    <ClCompile Include="tif_error.c" /> 
    <ClCompile Include="tif_extension.c" /> 
    <ClCompile Include="tif_fax3.c" /> 
    <ClCompile Include="tif_fax3sm.c" /> 
    <ClCompile Include="tif_flush.c" /> 
    <ClCompile Include="tif_getimage.c" /> 
    <ClCompile Include="tif_jbig.c" /> 
    <ClCompile Include="tif_jpeg.c" /> 
    <ClCompile Include="tif_luv.c" /> 
    <ClCompile Include="tif_lzw.c" /> 
    <ClCompile Include="tif_next.c" /> 
    <ClCompile Include="tif_ojpeg.c" /> 
    <ClCompile Include="tif_open.c" /> 
    <ClCompile Include="tif_packbits.c" /> 
    <ClCompile Include="tif_pixarlog.c" /> 
    <ClCompile Include="tif_predict.c" /> 
    <ClCompile Include="tif_print.c" /> 
    <ClCompile Include="tif_read.c" /> 
    <ClCompile Include="tif_strip.c" /> 
    <ClCompile Include="tif_swab.c" /> 
    <ClCompile Include="tif_thunder.c" /> 
    <ClCompile Include="tif_tile.c" /> 
    <ClCompile Include="tif_unix.c" /> 
    <ClCompile Include="tif_version.c" /> 
    <ClCompile Include="tif_warning.c" /> 
    <ClCompile Include="tif_write.c" /> 
    <ClCompile Include="tif_zip.c" /> 
+0

오늘 테스트를 거쳤습니다. 정말 잘 작동합니다! 고맙습니다! –

관련 문제