Skip to content

[osg] Fix link error caused by static tiff library#6674

Closed
Haojia521 wants to merge 8 commits intomicrosoft:masterfrom
Haojia521:fix-osg-tiff-link-err
Closed

[osg] Fix link error caused by static tiff library#6674
Haojia521 wants to merge 8 commits intomicrosoft:masterfrom
Haojia521:fix-osg-tiff-link-err

Conversation

@Haojia521
Copy link
Contributor

osg fails to build because tiff is static library. #5889

The unresolved external symbols mainly form two libraries, jpeg and liblzma, so i add them to the target libs of osg plugin osgdb_tiff. And it seems to work.

@ras0219-msft
Copy link
Contributor

It might be better to use TIFF_LIBRARIES[1].

Alternatively, we could include the dependencies inside the TIFF_LIBRARY variable.

[1] https://github.com/Kitware/CMake/blob/73472408c501e66c9dd8c027293b8c0907001b42/Modules/FindTIFF.cmake#L29-L30

@Haojia521
Copy link
Contributor Author

hi, @ras0219-msft . It's really a better way to use TIFF_LIBRARIES. In vcpkg, TIFF_LIBRARIES also includes the dependency libs(jpeg, lzma, zlib). Thanks your advice.

@cbezault cbezault assigned dan-shaw and unassigned cbezault Jun 5, 2019
@ras0219-msft
Copy link
Contributor

Thanks for the PR!

It looks like this is actually fixed by #6000, which adds the extra dependency libs to TIFF_LIBRARY. I definitely agree that osg should use TIFF_LIBRARIES, but since vcpkg is unblocked the right path forward would be to submit this to the upstream project: https://github.com/openscenegraph/OpenSceneGraph

@Haojia521 Haojia521 deleted the fix-osg-tiff-link-err branch June 11, 2019 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants