Question

I want to compile a plugin for an application as a dynamic library. Usually, plugins are compiled with VisualC++, but I'd like to use G++. The SDK Documentation explicitly states

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!

And indeed, it does crash instantly as soon as I pass values from my plugin to the application. Are there any options that result in the same behaviour as /vmg /vms in VisualC++?


Platform: Windows 7 x64
Compiler: MingW32 G++ 4.6.2

Was it helpful?

Solution

Since pointer-to-member representation is an implementation detail, and GCC ABI is not designed to be compatible with that of MSVC, there is never going to be an equivalent.

You will not be able to mix binaries compiled with said compilers as long as the working depends on implementation-specific (unspecified) details like the pointer representations.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top