Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building libavif Linker; unresolved external symbols from the libjpeg package #41666

Open
Arebusf21 opened this issue Oct 19, 2024 · 5 comments
Assignees
Labels
category:question This issue is a question

Comments

@Arebusf21
Copy link

Describe the bug
When building an executable to test the libavif package, I get Linker unresolved external symbol errors, specifically from the included external libjpeg-turbo libraries.

Environment

  • OS: Windows 10 Pro
  • Visual Studio 2022 Enterprise 64bit - Current.
  • V 17.11.5
  • Compiler: Visual C++ 2022
  • CMake project.

To Reproduce
Steps to reproduce the behavior:

  1. build a vs2022 Cmake project and target the libavif package.
  2. See the build log.

Expected behavior
Should build without linker unresolved symbols.

Failure logs
-(please attached failure logs)
Session log.txt

Additional context
Built as a Visual Studio 2022 CMake project to test building the libavif package. The project itself can be made available if needed
the libjpeg libraries with the missing modules are in the out\build\x64-Debug\vcpkg_installed\x64-windows\bin folder but the linker can't find them.
CMakeLists.txt file included:
CMakeLists.txt

@Mengna-Li
Copy link
Contributor

@Arebusf21 The latest libavif version is 1.1.1, Please pull the master and try the new release. Thanks.

@Mengna-Li Mengna-Li added the requires:more-information This Issue requires more information to solve label Oct 21, 2024
@Arebusf21
Copy link
Author

Thanks for the response.
Ok, so I managed to get the Linker to complete without errors, I have attached the session log.
I had to explicitly specify the library; jpeg.lib in the CMakeLists.txt file for my app, under "target_link_libraries".
I was under the impression that all the dependent libraries would be linked by default, but it makes sense the only the libraries are built
and linking is driven by the app.
Session log.txt

@Mengna-Li
Copy link
Contributor

libavif does not need to link jpeg.lib, upstream has already disabled JPEG finding in libuv.
AOMediaCodec/libavif#2459

@Mengna-Li Mengna-Li added category:question This issue is a question and removed requires:more-information This Issue requires more information to solve labels Oct 23, 2024
@Mengna-Li

This comment has been minimized.

@dg0yt
Copy link
Contributor

dg0yt commented Nov 8, 2024

I think it is not solved. #41666 (comment) was uninformed.

Note: the issue is for using libavif, not for building libavif.

@Mengna-Li Mengna-Li reopened this Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

3 participants