编译器错误 C3415
找到多个“section_name”节,它们具有不同的属性(“value”)
在 节 杂注中指定了冲突值。
value
是本节的当前设置,如 ntimage.h 中所指定。 例如:
// Section contains extended relocations.
#define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000
// Section can be discarded.
#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000
// Section is not cachable.
#define IMAGE_SCN_MEM_NOT_CACHED 0x04000000
// Section is not pageable.
#define IMAGE_SCN_MEM_NOT_PAGED 0x08000000
// Section is shareable.
#define IMAGE_SCN_MEM_SHARED 0x10000000
// Section is executable.
#define IMAGE_SCN_MEM_EXECUTE 0x20000000
// Section is readable.
#define IMAGE_SCN_MEM_READ 0x40000000
// Section is writeable.
#define IMAGE_SCN_MEM_WRITE 0x80000000
下面的示例生成 C3415:
// C3415.cpp
#pragma section("mysec1",write)
#pragma section("mysec1",read) // C3415
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈