gpt4 book ai didi

windows - VisualC++/vmg/vms 的 G++ 等价物

转载 作者:可可西里 更新时间:2023-11-01 10:00:36 24 4
gpt4 key购买 nike

我想将应用程序的插件编译为动态库。通常,插件是用 VisualC++ 编译的,但我想使用 G++。 SDK 文档明确指出

The compiler options for Pointer-to-member representation must be set to "General-Purpose Always" and "Point to Single-Inheritance Classes" in C++ tab/C++ language (/vmg /vms). If not set the plugin will crash instantly!

事实上,一旦我将值从我的插件传递到应用程序,它就会立即崩溃。是否有任何选项导致与 VisualC++ 中的 /vmg/vms 相同的行为?


平台:Windows 7 x64
编译器:MingW32 G++ 4.6.2

最佳答案

由于指向成员的指针表示是一个实现细节,并且 GCC ABI 并未设计为与 MSVC 兼容,因此永远不会有等效项。

只要工作依赖于特定于实现(未指定)的细节(如指针表示),您就不能混合使用上述编译器编译的二进制文件。

关于windows - VisualC++/vmg/vms 的 G++ 等价物,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11332585/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com