Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

生成cppwinrt示例时失败. #18

Closed
peaceshi opened this issue Jan 12, 2018 · 1 comment
Closed

生成cppwinrt示例时失败. #18

peaceshi opened this issue Jan 12, 2018 · 1 comment

Comments

@peaceshi
Copy link

peaceshi commented Jan 12, 2018

1>------ 已启动全部重新生成: 项目: XamlCalendar, 配置: Release x64 ------
1>pch.cpp
1>d:\projects\source\github\vc-ltl\ucrt\10.0.16299.0...._msvcrt.h(103) : info: 进入ltl普通模式,已准备对ltlxp.lib的引用。定义 __NO_LTL_LIB 可切换到超越模式。
1>D:\Projects\Source\GitHub\VC-LTL\ucrt\10.0.16299.0\corecrt_math.h(553): warning C4244: “参数”: 从“long double”转换到“double”,可能丢失数据
1>D:\Projects\Source\GitHub\VC-LTL\ucrt\10.0.16299.0\corecrt_math.h(970): warning C4244: “参数”: 从“long double”转换到“double”,可能丢失数据
1>D:\Projects\Source\GitHub\VC-LTL\ucrt\10.0.16299.0\corecrt_math.h(977): warning C4244: “参数”: 从“long double”转换到“double”,可能丢失数据
1>App.cpp
1>LINK : warning LNK4010: 子系统版本号 5.02 无效;假定为默认子系统版本
1>ltlxp.lib(_msvcrt.obj) : error LNK2001: 无法解析的外部符号 SystemFunction036
1>vc.lib(guard_support.obj) : error LNK2001: 无法解析的外部符号 _guard_dispatch_icall_nop
1>Release\x64\XamlCalendar.exe : fatal error LNK1120: 2 个无法解析的外部命令
1>已完成生成项目“XamlCalendar.vcxproj”的操作 - 失败。
已取消生成。

cppwinrt项目地址:
https://github.com/Microsoft/cppwinrt

此项目已加入Windows SDK (insider)
https://moderncpp.com/2017/11/15/cppwinrt-exe-in-the-windows-sdk/

VS2017 15.5.3.

@mingkuang-Chuyu
Copy link
Collaborator

无效反馈自身配置问题。

SystemFunction036:
SystemFunction036是为了提供随机数算法。但是由于是UWP因此默认没有加载一些WinAPI导致找不到符号,不过可以切换到Vista模式解决。另外UWP下也没有必要使用XP兼容模式吧?

_guard_dispatch_icall_nop:
一个月前在兼容QT时已经解决,只需要升级到最新VC-LTL即可。

最后虽然VC-LTL可以让这个UWP编译通过,但是个人觉得毫无意义。首先应用商店下载App时就会自动安装相关依赖运行时。其次使用VC-LTL编译UWP只会导致你不能上架,因为微软不允许在UWP里面依赖msvcrt.dll。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants