Skip to content
  • 0 Votes
    6 Posts
    3k Views
    Christian EhrlicherC

    @tuzepoito said in How do I use Qt headers in a CMake sub-project?:

    I think I have a solution, or maybe a workaround.

    Why workaround? If you want to use a library, you have to link against it what you're doing now - how should this be a workaround?

  • 0 Votes
    4 Posts
    391 Views
    SGaistS

    AFAIR, they match the mkspecs that you can find in your Qt installation.

  • 0 Votes
    3 Posts
    365 Views
    aarelovichA

    Maybe I expressed myself incorrectly. By native I meant that uses the WinMain function as an entry point, for example. Something like the code in the link I've poste.

    But If you can provide some example code on HOW I can use Qt and the win32 APi and Direct X 11, I'd appreaciate it. I have not been able to find ANYTHING online.

    Just a simple open a window and draw a circle or something will do. I want to know how con configure the .pro so that it will find all the appropriate libraries and the code will compile.

  • 0 Votes
    9 Posts
    4k Views
    S

    Thanks for your help with this. The Qt Creator editor is a good alternative. I did run Dependency Walker - long time since I have looked at the output from this and not sure what I am seeing right now, but I've pasted the an abreviated version of the output below (too long to paste the whole thing) if it tells you something. Thanks again.

    | System Information |

    | Search Order |

    * Legend: F File E Error (path not valid) * *

    Side-by-Side components (Windows 2000/XP/2003/Vista/+)
    [F ] c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.14393.2938_none_c58b03c797c07d8c\COMCTL32.DLL
    [F ] c:\windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.14393.2969_none_f678e0c2f2505d00\GDIPLUS.DLL
    The system's "KnownDLLs" list
    [F ] c:\windows\system32\ADVAPI32.DLL
    [F ] c:\windows\system32\BCRYPTPRIMITIVES.DLL
    [F ] c:\windows\system32\CFGMGR32.DLL
    [F ] c:\windows\system32\CLBCATQ.DLL
    [F ] c:\windows\system32\COMBASE.DLL
    [F ] c:\windows\system32\COMCTL32.DLL
    [F ] c:\windows\system32\COMDLG32.DLL
    [F ] c:\windows\system32\COML2.DLL
    [F ] c:\windows\system32\CRYPT32.DLL
    [F ] c:\windows\system32\DIFXAPI.DLL
    [F ] c:\windows\system32\GDI32.DLL
    [F ] c:\windows\system32\GDI32FULL.DLL
    [F ] c:\windows\system32\GDIPLUS.DLL
    [F ] c:\windows\system32\IMAGEHLP.DLL
    [F ] c:\windows\system32\IMM32.DLL
    [F ] c:\windows\system32\KERNEL.APPCORE.DLL
    [F ] c:\windows\system32\KERNEL32.DLL
    [F ] c:\windows\system32\KERNELBASE.DLL
    [F ] c:\windows\system32\LPK.DLL
    [F ] c:\windows\system32\MSASN1.DLL
    [F ] c:\windows\system32\MSCTF.DLL
    [F ] c:\windows\system32\MSVCP_WIN.DLL
    [F ] c:\windows\system32\MSVCRT.DLL
    [F ] c:\windows\system32\NORMALIZ.DLL
    [F ] c:\windows\system32\NSI.DLL
    [F ] c:\windows\system32\NTDLL.DLL
    [F ] c:\windows\system32\NTDLL.DLL
    [F ] c:\windows\system32\OLE32.DLL
    [F ] c:\windows\system32\OLEAUT32.DLL
    [F ] c:\windows\system32\POWRPROF.DLL
    [F ] c:\windows\system32\PROFAPI.DLL
    [F ] c:\windows\system32\PSAPI.DLL
    [F ] c:\windows\system32\RPCRT4.DLL
    [F ] c:\windows\system32\SECHOST.DLL
    [F ] c:\windows\system32\SETUPAPI.DLL
    [F ] c:\windows\system32\SHCORE.DLL
    [F ] c:\windows\system32\SHELL32.DLL
    [F ] c:\windows\system32\SHLWAPI.DLL
    [F ] c:\windows\system32\UCRTBASE.DLL
    [F ] c:\windows\system32\USER32.DLL
    [F ] c:\windows\system32\WIN32U.DLL
    [F ] c:\windows\system32\WINDOWS.STORAGE.DLL
    [F ] c:\windows\system32\WINTRUST.DLL
    [F ] c:\windows\system32\WLDAP32.DLL
    [F ] c:\windows\system32\WOW64.DLL
    [F ] c:\windows\system32\WOW64CPU.DLL
    [F ] c:\windows\system32\WOW64WIN.DLL
    [F ] c:\windows\system32\WS2_32.DLL
    The application directory
    [ ] C:\Qt\5.12.3\msvc2015_64\bin
    The 32-bit system directory
    [ ] C:\Windows\system32
    The 16-bit system directory (Windows NT/2000/XP/2003/Vista/+)
    [ ] C:\Windows\system
    The system's root OS directory
    [ ] C:\Windows
    The application's registered "App Paths" directories
    The system's "PATH" environment variable directories
    [ ] C:\Program Files\Microsoft MPI\Bin
    [ ] C:\Windows\system32
    [ ] C:\Windows
    [ ] c:\Qt\5.12.3\bin\

    | Module Dependency Tree |

    * Legend: F Forwarded Module ? Missing Module 6 64-bit Module * D Delay Load Module ! Invalid Module * * Dynamic Module E Import/Export Mismatch or Load Failure * ^ Duplicate Module * *

    [ 6] DESIGNER.EXE
    [ 6] QT5DESIGNERCOMPONENTS.DLL
    [ ^6] QT5DESIGNER.DLL
    [ ^6] QT5WIDGETS.DLL
    [ ^6] QT5GUI.DLL
    [ ^6] QT5XML.DLL
    [ ^6] QT5CORE.DLL
    [ E ] KERNEL32.DLL
    [FE ] NTDLL.DLL
    [ E ] VCRUNTIME140.DLL
    [ ^6] API-MS-WIN-CRT-RUNTIME-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-STRING-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-HEAP-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ 6] QT5DESIGNER.DLL
    [ ^6] QT5WIDGETS.DLL
    [ ^6] QT5GUI.DLL
    [ ^6] QT5XML.DLL
    [ ^6] QT5CORE.DLL
    [ E ] MSVCP140.DLL
    [ E ] VCRUNTIME140.DLL
    [ ^6] API-MS-WIN-CRT-HEAP-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-LOCALE-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-STRING-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-RUNTIME-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-STDIO-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ E6] API-MS-WIN-CRT-MATH-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-CONVERT-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-FILESYSTEM-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-TIME-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-ENVIRONMENT-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-UTILITY-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ E ] KERNEL32.DLL
    [FE ] NTDLL.DLL
    [DE ] CONCRT140.DLL
    [ E ] MSVCP140.DLL
    [ E ] VCRUNTIME140.DLL
    [ ^6] API-MS-WIN-CRT-RUNTIME-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-HEAP-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ E6] API-MS-WIN-CRT-MATH-L1-1-0.DLL
    [ ^6] API-MS-WIN-CRT-STRING-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-STDIO-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ E ] KERNEL32.DLL
    [FE ] NTDLL.DLL
    [ E ] KERNEL32.DLL
    [FE ] NTDLL.DLL
    [ E ] VCRUNTIME140.DLL
    [ ^6] API-MS-WIN-CRT-MATH-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-RUNTIME-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-STRING-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-STDIO-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-HEAP-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ 6] QT5PRINTSUPPORT.DLL
    [ ^6] QT5WIDGETS.DLL
    [ ^6] QT5GUI.DLL
    [ ^6] QT5CORE.DLL
    [ E ] WINSPOOL.DRV
    [ E ] COMDLG32.DLL
    [ E ] GDI32.DLL
    [ E ] USER32.DLL
    [ E ] KERNEL32.DLL
    [FE ] NTDLL.DLL
    [ E ] VCRUNTIME140.DLL
    [ ^6] API-MS-WIN-CRT-STDIO-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-HEAP-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-MATH-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ ^6] API-MS-WIN-CRT-RUNTIME-L1-1-0.DLL
    [FE ] UCRTBASE.DLL
    [ 6] QT5WIDGETS.DLL
    [ ^6] QT5GUI.DLL
    [ ^6] QT5CORE.DLL
    [ E ] UXTHEME.DLL
    [ E ] MSVCRT.DLL
    [ ? ] API-MS-WIN-CORE-LIBRARYLOADER-L1-2-0.DLL
    [ E6] API-MS-WIN-CORE-SYNCH-L1-2-0.DLL
    [FE ] KERNEL32.DLL
    [FE6] API-MS-WIN-CORE-SYNCH-L1-1-0.DLL
    [ ? ] API-MS-WIN-CORE-HEAP-L1-2-0.DLL
    [ ? ] API-MS-WIN-CORE-ERRORHANDLING-L1-1-1.DLL
    [ ? ] API-MS-WIN-CORE-PROCESSTHREADS-L1-1-2.DLL
    [ ? ] API-MS-WIN-CORE-LOCALIZATION-L1-2-1.DLL
    [ ? ] API-MS-WIN-CORE-DEBUG-L1-1-1.DLL
    [ ^6] API-MS-WIN-CORE-HANDLE-L1-1-0.DLL
    [FE ] KERNEL32.DLL
    [ ? ] API-MS-WIN-CORE-SYSINFO-L1-2-1.DLL
    [ ? ] API-MS-WIN-CORE-LIBRARYLOADER-L1-2-2.DLL
    [ ? ] API-MS-WIN-CORE-FILE-L1-2-1.DLL
    [ ^6] API-MS-WIN-CORE-STRING-L1-1-0.DLL
    [FE ] KERNEL32.DLL
    [ ^6] API-MS-WIN-CORE-UTIL-L1-1-0.DLL
    [FE ] KERNEL32.DLL
    [FE ] NTDLL.DLL
    [ ? ] API-MS-WIN-CORE-WINRT-ERROR-L1-1-1.DLL
    [ ? ] API-MS-WIN-CORE-REGISTRY-L1-1-0.DLL
    [ ? ] API-MS-WIN-SECURITY-BASE-L1-2-0.DLL
    [ ? ] API-MS-WIN-CORE-HEAP-L2-1-0.DLL
    [ ? ] API-MS-WIN-CORE-MEMORY-L1-1-2.DLL
    [ ^6] API-MS-WIN-CORE-PROFILE-L1-1-0.DLL
    [FE ] KERNEL32.DLL
    [ ? ] API-MS-WIN-CORE-STRING-L2-1-0.DLL
    [ ? ] API-MS-WIN-CORE-PROCESSENVIRONMENT-L1-2-0.DLL
    [ ^6] API-MS-WIN-CORE-TIMEZONE-L1-1-0.DLL
    [FE ] KERNEL32.DLL
    [ ? ] API-MS-WIN-CORE-SIDEBYSIDE-L1-1-0.DLL
    [ ? ] API-MS-WIN-CORE-ATOMS-L1-1-0.DLL
    [ ? ] API-MS-WIN-CORE-KERNEL32-LEGACY-L1-1-1.DLL
    [ ? ] API-MS-WIN-CORE-STRING-OBSOLETE-L1-1-0.DLL
    [ ? ] API-MS-WIN-CORE-SHLWAPI-OBSOLETE-L1-2-0.DLL
    [ ? ] API-MS-WIN-CORE-LOCALIZATION-OBSOLETE-L1-3-0.DLL
    [ E ] NTDLL.DLL
    [ E ] GDI32.DLL
    [ E ] USER32.DLL
    [FE ] NTDLL.DLL
    [ ? ] API-MS-WIN-CORE-DELAYLOAD-L1-1-1.DLL
    [D? ] API-MS-WIN-CORE-COM-L1-1-1.DLL
    [DE ] OLEAUT32.DLL
    [D? ] API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
    [D? ] API-MS-WIN-SECURITY-SDDL-L1-1-0.DLL
    [DE ] CRYPTSP.DLL
    [DE ] DWMAPI.DLL
    [DE ] WINDOWSCODECS.DLL

    ...

    | Module List |*

    * Legend: D Delay Load Module ? Missing Module 6 64-bit Module * * Dynamic Module ! Invalid Module * E Import/Export Mismatch or Load Failure * * Module File Time Stamp Link Time Stamp File Size Attr. Link Checksum Real Checksum CPU Subsystem Symbols Preferred Base Actual Base Virtual Size Load Order File Ver Product Ver Image Ver Linker Ver OS Ver Subsystem Ver

    [ ? ] API-MS-WIN-CORE-APIQUERY-L1-1-0.DLL Error opening file. The system cannot find the file specified (2).
    [ ? ] API-MS-WIN-CORE-APPCOMPAT-L1-1-1.DLL Error opening file. The system cannot find the file specified (2).
    [ ? ] API-MS-WIN-CORE-APPINIT-L1-1-0.DLL Error opening file. The system cannot find the file specified (2).
    [ ? ] API-MS-WIN-CORE-ATOMS-L1-1-0.DLL Error opening file. The system cannot find the file specified (2).
    [ ? ] API-MS-WIN-CORE-CALENDAR-L1-1-0.DLL Error opening file. The system cannot find the file specified (2).
    [ ? ] API-MS-WIN-CORE-COM-L1-1-0 Error opening file. The system cannot find the file specified (2).
    [ ? ] API-MS-WIN-CORE-COM-L1-1-1.DLL Error opening file. The system cannot find the file specified (2).
    [ ? ] API-MS-WIN-CORE-COM-MIDLPROXYSTUB-L1-1-0.DLL Error opening file. The system cannot find the file specified (2).

    | Log |*

    Error: At least one required implicit or forwarded dependency was not found.
    Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
    Error: Modules with different CPU types were found.
    Error: A circular dependency was detected.
    Warning: At least one delay-load dependency module was not found.
    Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

  • 0 Votes
    3 Posts
    2k Views
    oblivioncthO

    @oblivioncth said in Building 5.12.1 32-bit static Qt for MSVC on Windows 10: The system cannot find the file specified (qgltf5.pdb).:

    C:\Engineering\Development\Qt\Tools\QtCreator\bin\jom -j 8

    I wanted to keep the versions for the standard and static versions consistent, but its not like it would really matter since its just a small revision difference. So, I attempted to build 5.12.3 this time and while I was at it I grabbed the dynamically linked version of 5.12.3 from the maintenance tool as well.

    This time I ran the Visual Studio Native Tools command prompt as an administrator since I figured that had a shot at mattering even though I didn't see it mentioned anywhere and wasn't doing this is a UAC protected directory.

    And... it built completely with no issues and I was able to produced a statically linked version of the app I'm working on like I wanted to. I don't know if there was a bug in the 5.12.3 source, if it actually was running the prompt as administrator, if there was just a simultaneous access issue with some of the files/tools on the last run, or if it was just a fluke, but everything works fine now.

    The build ended on the same two lines but succeeded in copying qgltf.pdb instead of not finding it and the process took much longer than the previous attempt, so I'm guessing that there were errors earlier in the process that didn't stop the build script so I didn't catch them.

  • 0 Votes
    12 Posts
    4k Views
    P

    @SGaist said in Win32 static linking?:

    Qt Creator architecture has nothing to do with the architecture of your application.

    To build a 32bit version of your application, use the 32bit package for MSVC2017. The same goes for the 64bit version.

    Yeah, that worked. When I tried it in 5.12.0 and failed, there must have been something misconfigured.

    I currently don't know for the static version, however when building the dynamic version you can say to configure that it should build dynamic backend selection.

    Following some info from another post, I tried the following configure.bat options:

    -prefix "C:\Qt\Qt5.12.2\5.12.2\msvc2017sr" -release -platform win32-msvc -confirm-license -opensource -nomake examples -nomake tests -static -static-runtime -opengl dynamic -angle -combined-angle-lib -no-feature-d3d12

    Now it works on the 32-bit Windows machine I used to build Qt and the application (and still works fine on the 64-bit machine I can also build it on), but when I run it on another Win7 64-bit machine that has never had Qt installed on it, I just get the window frame again. Is it looking for a DLL? I only have a nebulous idea of what some of those configure options actually mean, so I don't know what to try next.

  • 0 Votes
    3 Posts
    995 Views
    S

    @sirop Vielen Dank für den Tipp.

    Ich habe jetzt herausgefunden das DLLs gefehlt haben. Dies habe ich herausgefunden als ich selbst die Anwendung ohne IDE gestartet habe. Da kamen entsprechende Fehlermeldungen. Nach einfügen dieser fehlenden DLLs funktioniert es nun.

    Vielen Dank für die Hilfe und an alle ein schönes Wochenende und einen guten Start in die neue Woche.

    Grüße
    Sven

  • 0 Votes
    2 Posts
    1k Views
    C

    I wrote to chromium developers, so, here is the summary

    It is not a crash, it is a failed debug assertion It happens if: you use webview's chromium backend (recent versions, old versions don't have this assertion) some part of you code consumes COM and that code's thread is not explicitly initializing COM via CoInitialize or CoInitializeEx

    My code uses a library that was not properly initializing COM in its threads before calling CoCreateInstance. Calling CoInitialize should fix my issue, but I cannot prove it until I have access to that libraries source code.

    What is left to be done by qt/webview team is to fix the failed assertion on "Chrome_InProcGpuThread" which is not created by user.

  • 0 Votes
    7 Posts
    2k Views
    R

    Thanks,

    I tried it without success.

    For me it seems the documentation is not up to date as the named folder sturcture is not existing in the EnterpriseDB installer installed version or in the official sources.

    I also looked whether there is something like an extra psql module to download, but have not found anything.

  • 0 Votes
    3 Posts
    1k Views
    Michael RozshkoM

    You are right! It is my error, rebuild all project with full delete old directory and all work fine. Thanks for fast and good answer!

  • 0 Votes
    14 Posts
    2k Views
    raven-worxR

    @milan said in Qt App runs and exits with crash 1073741819:

    But, I do not understand which widget is using OpenGL

    QQuickWidget (=> QML)
    Unless you explicitly tell it to use the software rasterizing backend.
    e.g. either via code QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software); or via environment variable QT_QUICK_BACKEND=software
    (before QApplication instantiation)

  • 0 Votes
    4 Posts
    3k Views
    E

    @jsulm there was in fact a problem with window3d() that MinGW didnt complain about! Thanks!
    @JonB no I had commented out only up to the second screenshot, so that's why this was the problem.
    And about the second issue, to be honest I adapted the constructor from an older version of the application and it also had &argc. At one point I also noticed it and now I tried out both and both work.

  • 0 Votes
    3 Posts
    2k Views
    JonBJ

    @EinderJam said in "Mismatch detected for RuntimeLibrary" when trying to statically compile with a static build of Qt:

    Before building, using this tutorial, I modified qt-everywhere-src-5.11.1\qtbase\mkspecs\msvc-desktop.conf and replaced every -MD by -MT
    Build process went fine.

    If you changed the Qt compilation flags at some point, did you clean out absolutely everything before rebuilding? Many times it seems bits get left over which have been compiled with previous flags.

  • 0 Votes
    3 Posts
    23k Views
    aha_1980A

    hi @cc672012

    you may have several problems, but the first one is that you assigned a 32bit compiler to a 64bit Qt version. That will not work.

  • 0 Votes
    1 Posts
    612 Views
    No one has replied
  • 0 Votes
    13 Posts
    13k Views
    Cobra91151C

    @SGaist

    Thanks. I will try it.

  • 0 Votes
    10 Posts
    5k Views
    SGaistS

    There's an initial release of the VS-AddIn here

    Sure there is, just build qtbase statically then build only the modules you want by hand or exclude all the modules you don't want when calling configure.

  • 0 Votes
    8 Posts
    4k Views
    SGaistS

    It went in but after the release of 5.8.0. So if you need it, either check the 5.9 alpha or build from Git.