そのほうがいいと思います
- libtiff をスタティック ライブラリとしてビルドします。
- ライブラリとリンクするコンソール アプリケーションとして fax2tiff をビルドする
さらに、ライブラリのバージョンで使用するファイルおよびメモリ関連ファイルのバージョンを決定する必要があります。ファイルおよびメモリ関連のファイルには、Unix、DOS、および Windows スタイルのバージョンがあります。
また、fax2tiff の場合は、おそらく Windows バージョンのgetopt.c
とgetopt.h
ファイルが必要になります。あなたはkoders.comwingetopt.h
で見つけて使用することができますwingetopt.c
このアプローチを使用してビルドされた libtiff-3.9.4 および tiff2pdf を正常に使用しています。
ところで、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" />