VS2017 共享节问题

VS2017 共享节问题

需要dll间共享数据,看了http://www.cnblogs.com/CBDoctor/archive/2013/01/26/2878201.html,尝试了下,使用def文件添加共享节
SECTION
myseg READ WRITE SHARED

发现VS2017编译出来没有共享节,查看编译警告:

1>Source.def(3): warning LNK4017: SECTION 语句不支持目标平台;已忽略
1>Source.def(4): warning LNK4017: myseg 语句不支持目标平台;已忽略

再查看一下msdn:

Linker Tools Warning LNK4017 keyword statement not supported for the
target platform; ignored The given module-definition statement is not
supported by this version of the linker tools. The tool ignored the
statement in the .def file.

For example, using DESCRIPTION in a .def file and not also using the
/VXD linker option will generate this warning.

当前编译的平台v140太高了,链接器已经不支持def文件里的section关键字了,遂改成
#pragma comment(linker,"/SECTION:myseg,RWS")

编译无警告,共享节生效

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值