-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
libjxl: find_library
imports unusable library with x64-windows-static
triplet
#34330
Comments
This shouldn't occur for x64-windows-static. |
The issue is a little bit more complicated. See libjxl/libjxl#2851. I'm not sure if it's could be fixed on the vcpkg side. The problem is that I need to define |
Option 1We can fix it on vcpkg side by provide an unofficial cmake config. find_package(unofficial-libjxl CONFIG REQUIRED)
target_link_libraries(main PRIVATE unofficial::libjxl::libjxl)
# And for libjxl_threads
target_link_libraries(main PRIVATE unofficial::libjxl::libjxl_threads) You can refer to Option 2This port has a pc file
Which allow the following usage, and in this way, you don't need to define find_package(PkgConfig REQUIRED)
pkg_check_modules(libjxl REQUIRED IMPORTED_TARGET libjxl)
target_link_libraries(main PRIVATE PkgConfig::libjxl)
# And for libjxl_threads
pkg_check_modules(libjxl_threads REQUIRED IMPORTED_TARGET libjxl_threads)
target_link_libraries(main PRIVATE PkgConfig::libjxl_threads) Update: |
See also #33422 #33390 and libjxl/libjxl#2754 |
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment. |
This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment. |
Describe the bug
Install libjxl with
x64-windows-static
triplet:Client application:
CMakeLists.txt:
main.c:
Environment
Result:
LNK2019 = unresolved external symbol
Compilation Log
Microsoft (R) Build Engine версии 16.11.2+f32259642 для .NET Framework (C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.Поиск библиотек
Поиск F:\projects\git.vcpkg\installed\x64-windows-static\lib\jxl-static.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\kernel32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\user32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\gdi32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\winspool.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\shell32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\ole32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\oleaut32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\uuid.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\comdlg32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\advapi32.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\MSVCRT.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\OLDNAMES.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\vcruntime.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64\ucrt.lib:
Поиск F:\projects\git.vcpkg\installed\x64-windows-static\lib\jxl-static.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\kernel32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\user32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\gdi32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\winspool.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\shell32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\ole32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\oleaut32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\uuid.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\comdlg32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\advapi32.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\MSVCRT.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\OLDNAMES.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\vcruntime.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64\ucrt.lib:
Поиск F:\projects\git.vcpkg\installed\x64-windows-static\lib\jxl-static.lib:
Поиск библиотек завершен
Поиск библиотек
Поиск F:\projects\git.vcpkg\installed\x64-windows-static\lib\jxl-static.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\kernel32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\user32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\gdi32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\winspool.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\shell32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\ole32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\oleaut32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\uuid.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\comdlg32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\advapi32.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\MSVCRT.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\OLDNAMES.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\vcruntime.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64\ucrt.lib:
Поиск библиотек завершен
Поиск библиотек
Поиск F:\projects\git.vcpkg\installed\x64-windows-static\lib\jxl-static.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\kernel32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\user32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\gdi32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\winspool.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\shell32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\ole32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\oleaut32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\uuid.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\comdlg32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\advapi32.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\MSVCRT.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\OLDNAMES.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\vcruntime.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64\ucrt.lib:
Поиск библиотек завершен
Поиск библиотек
Поиск F:\projects\git.vcpkg\installed\x64-windows-static\lib\jxl-static.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\kernel32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\user32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\gdi32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\winspool.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\shell32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\ole32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\oleaut32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\uuid.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\comdlg32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\advapi32.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\MSVCRT.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\OLDNAMES.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\vcruntime.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64\ucrt.lib:
Поиск библиотек завершен
Поиск библиотек
Поиск F:\projects\git.vcpkg\installed\x64-windows-static\lib\jxl-static.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\kernel32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\user32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\gdi32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\winspool.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\shell32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\ole32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\oleaut32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\uuid.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\comdlg32.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64\advapi32.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\MSVCRT.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\OLDNAMES.lib:
Поиск C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\vcruntime.lib:
Поиск C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64\ucrt.lib:
Поиск библиотек завершен
main.obj : error LNK2019: ссылка на неразрешенный внешний символ __imp_JxlDecoderCreate в функции main. [F:\projects\git.libjxl.vcpkg-test\build\libjxl-test.vcxproj]
F:\projects\git.libjxl.vcpkg-test\build\Release\libjxl-test.exe : fatal error LNK1120: неразрешенных внешних элементов: 1 [F:\projects\git.libjxl.vcpkg-test\build\libjxl-test.vcxproj]
Pkg-config notice
There are pkg-config files for libjxl, but I don't use pkg-config and have no plans to use it for technical reasons.
Question
Am I missing something? Is there a way to import libjxl with
find_library
only?The text was updated successfully, but these errors were encountered: