Driver C++ issue

9 篇文章 0 订阅
1 篇文章 0 订阅

Driver C++ issue

issue 1

找不到d3dkmthk.h,查找发现d3dkmthk.h位于km下于是添加C++附加查找目录可以解决

$(WindowsSdkDir)Include\$(TargetPlatformVersion)\km\

issue 2

error C2280: 'A::A(const A&)': attempting to reference a deleted function

关于这个错误,这里有交代 Deleted copy constructors

Deleted_implicitly-declared_copy_assignment_operator

issue 3

由于需要编译下驱动,down了分代码下来编译总是出现莫名的错误

error LNK2019: unresolved external symbol "void __cdecl operator delete[](void *,unsigned int)"

不过最终找到了答案,Link errors when trying to compile against an old STD library and windows SDK

So, after reading a lot of breaking changes documentations i found a flag that can suppress these new c++14 delete implementations here, under Placement new and delete.

Adding the flag /Zc:sizedDealloc- removes the missing operator delete() implementations.
Project properties -> Configuration Properties -> C/C++ -> Command Line -> /Zc:sizedDealloc-

you can revert to the old behavior by using the compiler option /Zc:sizedDealloc-. If you use this option, the two-argument delete functions don’t exist and won’t cause a conflict with your placement delete operator.

For the eh vector destructor iterator error I’ve opened a separate question, and answered it there.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值