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

[package] qt/6.5.3: Multiple issues on windows #20924

Closed
fnadeau opened this issue Nov 4, 2023 · 0 comments
Closed

[package] qt/6.5.3: Multiple issues on windows #20924

fnadeau opened this issue Nov 4, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@fnadeau
Copy link
Contributor

fnadeau commented Nov 4, 2023

Description

Package and Environment Details

  • Package Name/Version: qt/6.5.3
  • Operating System+version: Windows 10
  • Compiler+version: Visual Studio Community 2022
  • Conan version: conan 2.0.13
  • Python version: Python 3.11.4

Conan profile

Host profile:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows
[conf]
tools.cmake.cmaketoolchain:generator=Ninja

Build profile:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows
[conf]
tools.cmake.cmaketoolchain:generator=Ninja

Steps to reproduce

#include <QApplication>
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    return a.exec();
}

Can be fixed by adding:

#pragma comment(lib, "d3d9")
#pragma comment(lib, "setupapi")
#pragma comment(lib, "SHCore")

can be fixed by adding d3d9, setupapi to self.cpp_info.components["qtGui"].system_libs in conanfile.py

  • Build warning with conan 2.0 and visual studio (see logs)
    conan install --requires qt/6.5.3
    This seems to be related to the fact that conanfile.py doesn't have msvc in _minimum_compilers_version(), Visual Studio doesn't exist in setings.yml.

Logs

Issue with Conan 2.0 MSVC

======== Computing necessary packages ========
qt/6.5.3: WARN: C++17 support required. Your compiler is unknown. Assuming it supports C++17.
qt/6.5.3: Forced build from source

Build basic app, link fails [main] Building folder: conan-ads [build] Starting build [proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/Users/fnadeau/git-github/conan-ads/build --config Release --target ALL_BUILD -j 10 -- [build] Version MSBuild 17.7.2+d6990bcfa pour .NET Framework [build] [build] Automatic MOC and UIC for target main [build] main.cpp [build] Création de la bibliothèque C:/Users/fnadeau/git-github/conan-ads/build/src/Release/main.lib et de l'objet C:/Users/fnadeau/git-github/conan-ads/build/src/Release/main.exp [build] qwindows.lib(qwindowscontext.cpp.obj) : error LNK2019: symbole externe non résolu SetProcessDpiAwareness référencé dans la fonction "public: void __cdecl QWindowsContext::setProcessDpiAwareness(enum QtWindows::ProcessDpiAwareness)" (?setProcessDpiAwareness@QWindowsContext@@QEAAXW4ProcessDpiAwareness@QtWindows@@@z) [C:\Users\fnadeau\git-github\conan-ads\build\src\main.vcxproj] [build] qwindows.lib(qwindowscontext.cpp.obj) : error LNK2019: symbole externe non résolu GetProcessDpiAwareness référencé dans la fonction "public: static int __cdecl QWindowsContext::processDpiAwareness(void)" (?processDpiAwareness@QWindowsContext@@SAHXZ) [C:\Users\fnadeau\git-github\conan-ads\build\src\main.vcxproj] [build] qwindows.lib(qwindowsopengltester.cpp.obj) : error LNK2019: symbole externe non résolu Direct3DCreate9 référencé dans la fonction "public: __cdecl QDirect3D9Handle::QDirect3D9Handle(void)" (??0QDirect3D9Handle@@qeaa@XZ) [C:\Users\fnadeau\git-github\conan-ads\build\src\main.vcxproj] [build] qwindows.lib(qwindowswindow.cpp.obj) : error LNK2019: symbole externe non résolu GetDpiForMonitor référencé dans la fonction "public: struct QWindowsWindowData __cdecl WindowCreationData::create(class QWindow const *,struct QWindowsWindowData const &,class QString)const " (?create@WindowCreationData@@qeba?AUQWindowsWindowData@@PEBVQWindow@@aebu2@VQString@@@z) [C:\Users\fnadeau\git-github\conan-ads\build\src\main.vcxproj] [build] qwindows.lib(qwindowsscreen.cpp.obj) : error LNK2001: symbole externe non résolu GetDpiForMonitor [C:\Users\fnadeau\git-github\conan-ads\build\src\main.vcxproj] [build] qwindows.lib(qwindowsscreen.cpp.obj) : error LNK2019: symbole externe non résolu __imp_SetupDiOpenDeviceInterfaceW référencé dans la fonction "void __cdecl setMonitorDataFromSetupApi(struct QWindowsScreenData &,class std::vector > const &)" (?setMonitorDataFromSetupApi@@YAXAEAUQWindowsScreenData@@aebv?$vector@UDISPLAYCONFIG_PATH_INFO@@v?$allocator@UDISPLAYCONFIG_PATH_INFO@@@std@@@std@@@z) [C:\Users\fnadeau\git-github\conan-ads\build\src\main.vcxproj] [build] qwindows.lib(qwindowsscreen.cpp.obj) : error LNK2019: symbole externe non résolu __imp_SetupDiGetDeviceInterfaceDetailW référencé dans la fonction "void __cdecl setMonitorDataFromSetupApi(struct QWindowsScreenData &,class std::vector > const &)" (?setMonitorDataFromSetupApi@@YAXAEAUQWindowsScreenData@@aebv?$vector@UDISPLAYCONFIG_PATH_INFO@@v?$allocator@UDISPLAYCONFIG_PATH_INFO@@@std@@@std@@@z) [C:\Users\fnadeau\git-github\conan-ads\build\src\main.vcxproj] [build] qwindows.lib(qwindowsscreen.cpp.obj) : error LNK2019: symbole externe non résolu __imp_SetupDiGetClassDevsW référencé dans la fonction "void __cdecl setMonitorDataFromSetupApi(struct QWindowsScreenData &,class std::vector > const &)" (?setMonitorDataFromSetupApi@@YAXAEAUQWindowsScreenData@@aebv?$vector@UDISPLAYCONFIG_PATH_INFO@@v?$allocator@UDISPLAYCONFIG_PATH_INFO@@@std@@@std@@@z) [C:\Users\fnadeau\git-github\conan-ads\build\src\main.vcxproj] [build] qwindows.lib(qwindowsscreen.cpp.obj) : error LNK2019: symbole externe non résolu __imp_SetupDiOpenDevRegKey référencé dans la fonction "void __cdecl setMonitorDataFromSetupApi(struct QWindowsScreenData &,class std::vector > const &)" (?setMonitorDataFromSetupApi@@YAXAEAUQWindowsScreenData@@aebv?$vector@UDISPLAYCONFIG_PATH_INFO@@v?$allocator@UDISPLAYCONFIG_PATH_INFO@@@std@@@std@@@z) [C:\Users\fnadeau\git-github\conan-ads\build\src\main.vcxproj] [build] C:\Users\fnadeau\git-github\conan-ads\build\src\Release\main.exe : fatal error LNK1120: 8 externes non résolus [C:\Users\fnadeau\git-github\conan-ads\build\src\main.vcxproj] [proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/Users/fnadeau/git-github/conan-ads/build --config Release --target ALL_BUILD -j 10 -- exited with code: 1 [driver] Build completed: 00:00:03.496 [build] Build finished with exit code 1
@fnadeau fnadeau added the bug Something isn't working label Nov 4, 2023
@fnadeau fnadeau closed this as completed Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant