简体   繁体   English

pyconfig.h 致命错误“io.h”文件未找到

[英]pyconfig.h fatal error 'io.h' file not found

I've successfully generated a .pro file with pyqtdeploy, so I opened the file with Qt Creator.我已经用 pyqtdeploy 成功生成了一个.pro文件,所以我用 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). Qt Creator 上的 Android 配置没有问题,但是当我尝试构建apkpyconfig.h fatal error 'io.h' file not found这个错误pyconfig.h fatal error 'io.h' file not found (顺便说一下,构建 exe 没问题)。 在此处输入图片说明

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\u003c/code> 1.在环境C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\ucrt\u003c/code>添加了这个路径

2. Included the above path in .pro file 2.在.pro文件中包含上述路径在此处输入图片说明

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 . 3.我在我的NDK文件夹中找到io.h文件,我尝试在.pro文件中包含路径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:但是,我遇到了更疯狂的错误: 在此处输入图片说明 so, I don't think this is the right way to include io.h file.所以,我认为这不是包含io.h文件的正确方法。

4. I directly copied the io.h from C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\ucrt\u003c/code> to the path where pyconfig.h is. 4.我直接复制的io.hC:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\ucrt\u003c/code>到所在的路径pyconfig.h是。 The error changed, the not found file is no longer io.h , but corect_io.h .错误改变了,未找到的文件不再是io.h ,而是corect_io.h 在此处输入图片说明

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:在我遇到此错误之前,它似乎一直有效: 在此处输入图片说明 The strange thing is vadefs.h exhists in the ndk path(shown in error), but it uses #include_next trying to find other vadefs.h files from other paths.奇怪的是vadefs.h在 ndk 路径中存在(显示错误),但它使用#include_next试图从其他路径查找其他vadefs.h文件。 (Am I right?) (我对吗?)

I'm totally lost.我完全迷路了。 I don't even know if No. 4 is the right way to include files.我什至不知道No. 4是否是包含文件的正确方法。 Any help would be appreciated.任何帮助,将不胜感激。

As try number 4 fixed your error, maybe you need to copy the files over to your project until it works.由于第 4 次尝试修复了您的错误,也许您需要将文件复制到您的项目中,直到它起作用为止。 If that works, your include path is probably borked and repairing that depends on the compiler.如果可行,则您的包含路径可能会被破坏并修复,这取决于编译器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM