Re: [Tiff] Building libtiff with WEBP support
> Based on the error you're getting, I assume you're building against > static WebP? Otherwise it should stay happily hidden behind the DLL façade. Yes, I am building against static WebP. ___ Tiff mailing list Tiff@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/tiff
Re: [Tiff] Building libtiff with WEBP support
Hi, I'm maintaining WebP's Find Module for Krita, so thanks for the heads up. Based on the error you're getting, I assume you're building against static WebP? Otherwise it should stay happily hidden behind the DLL façade. amyspark On 05/10/2022 09:32, Miguel Medalha wrote: Salutations to all Due to some recent changes in the WEBP source code, building the dynamic libtiff library with WEBP support started giving the following error messages: libwebp.lib(picture_csp_enc.obj) : error LNK2001: unresolved external symbol SharpYuvConvert [C:\Build\bin\libtiff\libtiff\tiff.vcxproj] libwebp.lib(picture_csp_enc.obj) : error LNK2001: unresolved external symbol SharpYuvGetConversionMatrix [C:\Build\bin\libtiff\libtiff\tiff.vcxproj] libwebp.lib(picture_csp_enc.obj) : error LNK2001: unresolved external symbol SharpYuvInit [C:\Build\bin\libtiff\libtiff\tiff.vcxproj] C:\Build\bin\libtiff\libtiff\Release\tiff.dll : fatal error LNK1120: 3 unresolved externals [C:\Build\bin\libtiff\libtiff\tiff.vcxproj] This is related to the introduction of a new library in WEBP, libsharpyuv.lib. I solved the problem by appending the following to the end of libtiff/libtiff/CMakeLists.txt: if(WEBP_SUPPORT) target_link_libraries(${PROJECT_NAME} PRIVATE "C:/build/lib/libsharpyuv.lib") endif() or including the line in the relevant WEBP section (starting with line 148): if(WEBP_SUPPORT) target_link_libraries(tiff PRIVATE WebP::WebP) string(APPEND tiff_requires_private " libwebp") target_link_libraries(${PROJECT_NAME} PRIVATE "C:/build/lib/libsharpyuv.lib") endif() With this line, libtiff builds and works correctly. But having to edit the file by hand each time is not very elegant and I would like to find a definitive solution. I tried to pass the instruction on the cmake command line, but I couldn’t find a working solution. Better still would be someone with the necessary programming knowledge to come up with a permanent solution on the original libtiff code. I am not a developer, I am a libtiff user with just enough knowledge to compile it myself and lightly modify code to solve basic issues. I can also introduce the reference to libshrpyuv in Microsoft Visual Studio, under Linker/Input/Additional Dependencies, but I mostly prefer to build from the command line using cmake. Any tips would be appreciated. Thank you. ___ Tiff mailing list Tiff@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/tiff -- amyspark https://www.amyspark.me ___ Tiff mailing list Tiff@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/tiff
Re: [Tiff] Building libtiff with WEBP support
I found a temporary way of doing this without editing the source. On cmake command line: -DCMAKE_PROJECT_INCLUDE=my_include_file ‘my_include_file’ has the following contents: link_libraries("C:/build/lib/libsharpyuv.lib") This is not very elegant, because it inserts the library as a dependency of all targets, not just the ‘tiff’ one, but for now it seems to work without undesirable secondary effects. ___ Tiff mailing list Tiff@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/tiff
Re: [Tiff] Building libtiff with WEBP support
Of course this: if(WEBP_SUPPORT) target_link_libraries(tiff PRIVATE WebP::WebP) string(APPEND tiff_requires_private " libwebp") target_link_libraries(${PROJECT_NAME} PRIVATE "C:/build/lib/libsharpyuv.lib") endif() can be simplified to this: if(WEBP_SUPPORT) target_link_libraries(tiff PRIVATE WebP::WebP C:/build/lib/libsharpyuv.lib) string(APPEND tiff_requires_private " libwebp") endif() ___ Tiff mailing list Tiff@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/tiff
[Tiff] Building libtiff with WEBP support
Salutations to all Due to some recent changes in the WEBP source code, building the dynamic libtiff library with WEBP support started giving the following error messages: libwebp.lib(picture_csp_enc.obj) : error LNK2001: unresolved external symbol SharpYuvConvert [C:\Build\bin\libtiff\libtiff\tiff.vcxproj] libwebp.lib(picture_csp_enc.obj) : error LNK2001: unresolved external symbol SharpYuvGetConversionMatrix [C:\Build\bin\libtiff\libtiff\tiff.vcxproj] libwebp.lib(picture_csp_enc.obj) : error LNK2001: unresolved external symbol SharpYuvInit [C:\Build\bin\libtiff\libtiff\tiff.vcxproj] C:\Build\bin\libtiff\libtiff\Release\tiff.dll : fatal error LNK1120: 3 unresolved externals [C:\Build\bin\libtiff\libtiff\tiff.vcxproj] This is related to the introduction of a new library in WEBP, libsharpyuv.lib. I solved the problem by appending the following to the end of libtiff/libtiff/CMakeLists.txt: if(WEBP_SUPPORT) target_link_libraries(${PROJECT_NAME} PRIVATE "C:/build/lib/libsharpyuv.lib") endif() or including the line in the relevant WEBP section (starting with line 148): if(WEBP_SUPPORT) target_link_libraries(tiff PRIVATE WebP::WebP) string(APPEND tiff_requires_private " libwebp") target_link_libraries(${PROJECT_NAME} PRIVATE "C:/build/lib/libsharpyuv.lib") endif() With this line, libtiff builds and works correctly. But having to edit the file by hand each time is not very elegant and I would like to find a definitive solution. I tried to pass the instruction on the cmake command line, but I couldn’t find a working solution. Better still would be someone with the necessary programming knowledge to come up with a permanent solution on the original libtiff code. I am not a developer, I am a libtiff user with just enough knowledge to compile it myself and lightly modify code to solve basic issues. I can also introduce the reference to libshrpyuv in Microsoft Visual Studio, under Linker/Input/Additional Dependencies, but I mostly prefer to build from the command line using cmake. Any tips would be appreciated. Thank you. ___ Tiff mailing list Tiff@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/tiff