QtPass builds on Windows using MSVC, qmake and nmake.
MinGW is not supported with nmake.
Run in Administrator PowerShell:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install vcredist140 -y
choco install qtpass -yDownload the latest .exe installer from GitHub Releases
QtPass requires GPG for encryption. Install Gpg4win.
Key generation can take a long time (especially RSA 4096-bit keys) - this is normal.
Use Qt 6 on Windows. Qt 5.15 cannot be compiled by a current MSVC: it defines
QT_MAKE_CHECKED_ARRAY_ITERATORasstdext::make_checked_array_iterator, which Microsoft has removed from its STL, soqlist.hfails witherror C2653: 'stdext': is not a class or namespace name. CI only tests Qt 5.15 on Linux.
From any cmd.exe — this loads the MSVC x64 environment, picks an MSVC Qt and
builds:
git clone https://github.com/IJHack/QtPass.git
cd QtPass
scripts\build-windows.cmdPass a target to do something else, for example scripts\build-windows.cmd check
or scripts\build-windows.cmd distclean. Set QT_DIR to choose a specific Qt:
set QT_DIR=C:\Qt\6.8.0\msvc2022_64The script checks each prerequisite and explains what is wrong rather than letting the build fail deep inside Qt headers. The manual steps below do the same thing by hand.
Run in Administrator PowerShell:
choco install -y git python visualstudio2022buildtools visualstudio2022-workload-vctoolsInstall an MSVC build of Qt (not MinGW).
Do not use mingw_64. It will not work with nmake.
Run in normal PowerShell:
py -m pip install --user -U aqtinstall
py -m aqt install-qt -O C:\Qt windows desktop 6.8.0 win64_msvc2022_64Any install prefix works — -O C:\Qt is only an example. scripts\build-windows.cmd
searches C:\Qt, R:\Qt, D:\Qt and %USERPROFILE%\Qt, or use QT_DIR to
point it anywhere.
Open a Developer Command Prompt for VS 2022 or run:
"%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64Then set (adjust the Qt path to your install):
set PATH=C:\Qt\6.8.0\msvc2022_64\bin;C:\Program Files\Git\bin;%PATH%
set QMAKESPEC=
set QTDIR=Verify the shell before building — these two checks catch the mistakes that otherwise surface as confusing compiler errors:
where qmake
qmake -query QT_VERSION
clqmakemust resolve inside your Qtmsvc*_64\bin, and report a 6.x version. If a Python distribution is installed, its Qt often comes first onPATH— Anaconda ships Qt 5.15 asE:\...\anaconda3\Library\bin\qmake.exeand will hijack the build. Prepending the Qt bin directory, as above, fixes it.clmust printfor x64. A 32-bit shell fails later at link time withLNK1112.
git clone https://github.com/IJHack/QtPass.git
cd QtPassIf you previously built with another Qt version or toolchain:
del .qmake.stashThen build:
qmake -spec win32-msvc
nmake
nmake check TESTARGS="--platform offscreen"Two Windows-specific gotchas:
nmake checkstops at the first failing test binary, so later results are never reached.nmake /Kdoes not help, because qmake's recursive rules invokenmakewithout it.- QtTest output is lost when redirected or piped on Windows. Use
-oto capture it; the exit code is reliable either way.
To run one test and read its output:
cd tests\auto\totp
release\tst_totp.exe -o results.txt,txt --platform offscreen
type results.txtAdd a test function name to narrow it further, e.g.
release\tst_totp.exe generateRfc6238Vectors -o results.txt,txt.
- qmake must come from
msvc2022_64, notmingw_64 - Qt 6 is required; Qt 5.15 does not compile with a current MSVC (see above)
- nmake requires the MSVC environment (
VsDevCmd.bat) - tests expect
bash(provided by Git for Windows) - refreshing
localization/*.tsis the explicitlupdatetarget (nmake lupdate); a plainqmakerun leaves them alone
- Launch QtPass
- Click "Autodetect" to find GPG and Git
- Set your password store location (default:
%APPDATA%\password-store) - Or select an existing
passstore folder
- Go to Config → User to select your GPG key
- If using for the first time, generate a key with Config → Generate GPG key
- Click File → Initialize
- Select your GPG key(s) for encryption
- Your
.gpg-idfile will be created
| Issue | Solution |
|---|---|
| "GnuPG not found" | Install Gpg4win, restart QtPass, or set path manually in Config |
| "Signature does not exist" | Ensure your GPG key is in the .gpg-id file via Config → Users |
| Git not working | Use Git Credential Manager for HTTPS authentication |
| App doesn't start | Install vcredist140 (Visual C++ Redistributable) |
QMAKE_MSC_VER isn't set |
delete .qmake.stash and rerun qmake |
'stdext': is not a class or namespace name / make_checked_array_iterator' : identifier not found |
qmake is a Qt 5.15 build, often Anaconda's on PATH. Qt 5.15 cannot compile with a current MSVC - use Qt 6. Check with where qmake |
LNK1112: module machine type 'x64' conflicts with target machine type 'x86' |
32-bit MSVC shell. Use VsDevCmd.bat -arch=amd64 -host_arch=amd64, or scripts\build-windows.cmd |
uic/rcc/lrelease run from an unexpected directory |
Another Qt is earlier on PATH. Prepend your Qt bin (Step 3) or use scripts\build-windows.cmd |
nmake check reports no test output |
Expected on Windows - QtTest output is lost when redirected. Run the test binary with -o results.txt,txt |
nmake fails with Unix commands (test, mkdir -p) |
Wrong Qt variant installed (MinGW instead of MSVC) - reinstall using MSVC Qt build |
| Should find Bash in PATH | ensure C:\Program Files\Git\bin is on PATH |
| cl not found | MSVC environment not loaded - run VsDevCmd.bat |
Clean and reconfigure:
del .qmake.stash
nmake distclean
qmake