C++ Interfacing:'static' array function parameter contradiction

ParticlePeter via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Apr 29 01:08:27 PDT 2017


On Saturday, 29 April 2017 at 00:31:32 UTC, Nicholas Wilson wrote:
>
> If you are having problems with the linker with Ali's you can do
> ```
> extern(C++) bool cppFunc( float[3] color ); // correct 
> signature, but causes compiler error
>
> pragma(mangle, cppFunc.mangleof)
> float cppFunc(float * color); // compatible signature but wrong 
> mangling overridden with pragma(mangle,...)

Thanks for that hint! I got it to work. Side note, 
cppFunc.mangleof cannot be used as it is unknown. I guess your 
intention was to get the C++ mangling from somewhere else, I got 
it from dependency walker.


More information about the Digitalmars-d-learn mailing list