Building Klayout successful under windows but receiving an error when launching the exe

edited April 2022 in KLayout Support

I have successfully built the klayout 0.27.7 under windows 10 using the instructions at (section: Building KLayout on Windows (Version 0.26))

However, when running the generated exe, I am receiving the following error:

The application failed to start because it could not find or load the Qt platform plugin "windows" in "". Reinstall the application may fix this problem.

Kindly note that the environment variable $Path has the following paths in it:

%Path% Environment variable in current User account:

c:\Program Files\NASM;
c:\Program Files\cmake\bin;
C:\Users\Hosam-Lenovo\AppData\Local\Programs\Microsoft VS Code\bin;

And of course We have the anaconda environment variable defined before the Path environment variable as following:

Vstudio 2017 is installed on the system.

Initially Qt was not installed as it didn't seem to be required according to the instructions in Probably because it seems that anaconda already has many of the Qt binaries and dlls required.

After receiving this error though, I installed Qt 5.12.2. yet the error still not fixed.

I guessed that the platform plugin file reported in the error message has to be the qwindows.dll file which exist in C:\ProgramData\Anaconda3\Library\plugins\platforms\qwindows.dll
so I added %anaconda%\Library\plugins\platforms the $Path environment variable right after %anaconda%\Library\bin yet the error still shows.

Finally I installed the binary Klayout on the same machine from the installer to make sure there is no issue in the environment, and was able to use the installed Klayout without errors. However I need to build klayout from the source as I might add customization to the source code.

Here is as well a screenshot of the files generated by building klayout based on the instructions in

I am running out of options and would greatly appreciate any pointers or suggestions.

For example, Do we really need to install Qt in order to run the built klayout exe ? and even if this is the case, still this didn't solve the error..

Is there a way to generate more detailed logs from executing the klayout.exe that would point out exactly what is the problem in more details?

I used DbgView.exe with options enabled to capture everything and tried to detect any more details regarding this error, yet I didn't find any error related to the process of Klayout.exe

Thanks in Advance!



  • Hi Hosam,

    Debugging on Windows is a pain and without access to your system, I can only guess what is the problem.

    The message you see is generated by Qt, not from KLayout. Unless there is a Qt specific debug option I do not think you can get more messages.

    First aid: always google the error message first. For example I find this one:
    Maybe this is already helpful.

    I myself have not built the whole application against Anaconda yet. I am building against pure Qt with MSVC 2017 and 2019 and I am building the Python modules (

    The released binaries are not made with MSVC or Anaconda, but with MSYS2. This is a Unix-like emulation layer and package manager and allows building Windows binaries with the same (gcc) toolchain than on Linux. It's usually painless and utilizes the same build script than Linux. You need to install a couple of packages, that's it.

    If your requirements do not include MSVC or a specific Python installation, this is the easiest way to go.


Sign In or Register to comment.