c++ - IoT Core 的 C++/WinRT 控制台应用程序卡在初始屏幕上
问题描述
这只是模板中的开箱即用(如从此处指示),并通过执行远程机器调试会话推送到(虚拟机)模拟设备。
为什么它卡在启动画面上?有人遇到同样的情况吗?我错过了什么吗?
当我运行它时,它部署得很好,给出了这个调试输出(没什么可说的,我不认为):
'ConsoleCppWinRt3.exe' (Win32): Loaded 'U:\Users\DefaultAccount\AppxLayouts\cc60f819-ef47-4858-b213-8af8c3669919VS.Debug_Win32.nm1\ConsoleCppWinRt3.exe'. Symbols loaded.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\kernel32legacy.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'U:\Programs\WindowsApps\Microsoft.VCLibs.140.00.Debug_14.0.26428.1_x86__8wekyb3d8bbwe\vcruntime140d_app.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'U:\Users\DefaultAccount\AppxLayouts\cc60f819-ef47-4858-b213-8af8c3669919VS.Debug_Win32.nm1\ucrtbased.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Cannot find or open the PDB file.
'ConsoleCppWinRt3.exe' (Win32): Loaded 'C:\Windows\System32\procthreadexthost.dll'. Cannot find or open the PDB file.
The thread 0xd38 has exited with code 0 (0x0).
编辑
如果我暂停调试器,它在控制台代码中。但是闪屏还是碍事什么的。例如,在这段代码中,调试器在getchar()
调用中:
int main()
{
wprintf(L"Hello IoT");
getchar();
}
但在这段代码中:
int main()
{
wprintf(L"Hello IoT");
Sleep(10000);
}
...它在Sleep
通话中,但在 10 秒后它关闭导致 Visual Studio 声明:
无法激活 Windows 商店应用程序 [...]。myapp.exe 进程已启动,但激活请求失败并出现错误“应用程序未启动”。
我不应该调用一些东西来关闭启动屏幕或一些明显的东西,是吗?
解决方案
推荐阅读
- reactjs - 从 firestore 渲染数组以响应本机时出错
- reactjs - 如果使用 iPhone ios v12.4 打开网站,Reactjs axios 返回网络错误
- numpy - 约束 numpy 自动将整数转换为浮点数(python 3.7)
- java - 如何修复使用 jfoenix 触发的错误?
- node.js - 更新nodejs后离子环境变得不稳定
- javascript - jQuery - If 语句检测页面加载
- jquery - 如何在 jquery 数据表 onchange 事件回调中获取单元格的新值
- c# - 从 Cognito 组担任 IAM 角色
- python - jupyter nbconvert --to html --no-inp 正在缩小集中表的显示
- visual-studio-code - 如何在默认构建任务中正确使用 CMake,以及为什么启用 WSL(2) 会改变 VSCode 任务行为?