pyconfig.h fatal error 'io.h' file not found

883 Views Asked by At

I've successfully generated a .pro file with pyqtdeploy, so I opened the file with Qt Creator.

Android configuration on Qt Creator has no problem, but I get this error pyconfig.h fatal error 'io.h' file not found when I try to build the apk (by the way, building exe is no problem). enter image description here

Here are the things I've tried, but didn't work:

1. Added this path to the environment C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt

2. Included the above path in .pro file enter image description here

3. I found the io.h file in my NDK folder, and I tried to included the path in the .pro file D:\SDK\android-sdk_r24.4.1-windows\ndk\21.1.6352462\sources\third_party\shaderc\libshaderc_util\include\libshaderc_util. However, I got crazier errors: enter image description here so, I don't think this is the right way to include io.h file.

4. I directly copied the io.h from C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt to the path where pyconfig.h is. The error changed, the not found file is no longer io.h, but corect_io.h. enter image description here

And I copied this file and the following not found files from the same path, too. It seemed to work until I met this error: enter image description here The strange thing is vadefs.h exhists in the ndk path(shown in error), but it uses #include_next trying to find other vadefs.hfiles from other paths. (Am I right?)

I'm totally lost. I don't even know if No. 4 is the right way to include files. Any help would be appreciated.

1

There are 1 best solutions below

0
On

As try number 4 fixed your error, maybe you need to copy the files over to your project until it works. If that works, your include path is probably borked and repairing that depends on the compiler.