I already have a few procedures intending to be used as C++ methods written in Assembly (with proper calling convention and name mangling). However, when I try to use them
class Foo {
extern void foo();
}
I get “invalid storage class for a class member.” How can I properly externally define a C++ method?
One workaround is to generate a thunk defining the method which simply calls the assembly version, using inline assembly to support the thiscall convention. In fact, I already have code to generate these. However, I’d really like to get this more direct method working.
Just leave off the extern. Functions are externally visible by default.