On Saturday, 29 April 2017 at 18:54:36 UTC, سليمان السهمي
(Soulaïman Sahmi) wrote:
But still, this needs to be fixed, copy pasting the name
mangling is in my opinion just a hack for your specific cpp
compiler on your specific platform.
It can't be fixed on the D side as the Visual C++
On Saturday, 29 April 2017 at 08:08:27 UTC, ParticlePeter wrote:
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
On Saturday, 29 April 2017 at 10:17:47 UTC, Atila Neves wrote:
On Saturday, 29 April 2017 at 06:22:03 UTC, ParticlePeter wrote:
On Saturday, 29 April 2017 at 01:49:56 UTC, Atila Neves wrote:
On Friday, 28 April 2017 at 18:41:22 UTC, kinke wrote:
[...]
The worst part about that is mangling
On Saturday, 29 April 2017 at 06:22:03 UTC, ParticlePeter wrote:
On Saturday, 29 April 2017 at 01:49:56 UTC, Atila Neves wrote:
On Friday, 28 April 2017 at 18:41:22 UTC, kinke wrote:
[...]
The worst part about that is mangling aside, the two
declarations are identical to the compiler.
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);
On Saturday, 29 April 2017 at 01:49:56 UTC, Atila Neves wrote:
On Friday, 28 April 2017 at 18:41:22 UTC, kinke wrote:
On Friday, 28 April 2017 at 18:07:49 UTC, ParticlePeter wrote:
Interesting, your example corresponds to my third case, the
linker error. I am on Window, building an x64 App,
On Friday, 28 April 2017 at 18:41:22 UTC, kinke wrote:
On Friday, 28 April 2017 at 18:07:49 UTC, ParticlePeter wrote:
Interesting, your example corresponds to my third case, the
linker error. I am on Window, building an x64 App, afaik in
that case the MS Visual Studio linker is used instead of
On Friday, 28 April 2017 at 19:08:18 UTC, ParticlePeter wrote:
On Friday, 28 April 2017 at 17:57:34 UTC, Ali Çehreli wrote:
On 04/28/2017 08:56 AM, ParticlePeter wrote:
> C++ Function:
> bool cppFunc( float[3] color );
>
> D binding:
> extern(C++) bool cppFunc( float[3] color );
>
> Using with:
On Friday, 28 April 2017 at 17:57:34 UTC, Ali Çehreli wrote:
On 04/28/2017 08:56 AM, ParticlePeter wrote:
> C++ Function:
> bool cppFunc( float[3] color );
>
> D binding:
> extern(C++) bool cppFunc( float[3] color );
>
> Using with:
> float[3] my_color;
> cppFunc( my_color );
>
> -> Error:
On Friday, 28 April 2017 at 18:07:49 UTC, ParticlePeter wrote:
Interesting, your example corresponds to my third case, the
linker error. I am on Window, building an x64 App, afaik in
that case the MS Visual Studio linker is used instead of
optilink. Will add your findings to the bug report.
On Friday, 28 April 2017 at 17:57:34 UTC, Ali Çehreli wrote:
On 04/28/2017 08:56 AM, ParticlePeter wrote:
> C++ Function:
> bool cppFunc( float[3] color );
>
> D binding:
> extern(C++) bool cppFunc( float[3] color );
>
> Using with:
> float[3] my_color;
> cppFunc( my_color );
>
> -> Error:
On 04/28/2017 08:56 AM, ParticlePeter wrote:
> C++ Function:
> bool cppFunc( float[3] color );
>
> D binding:
> extern(C++) bool cppFunc( float[3] color );
>
> Using with:
> float[3] my_color;
> cppFunc( my_color );
>
> -> Error: Internal Compiler Error: unable to pass static array to
That part
On Friday, 28 April 2017 at 17:15:54 UTC, kinke wrote:
On Friday, 28 April 2017 at 15:56:17 UTC, ParticlePeter wrote:
So what next? How can I interface to the cpp function?
*** C++:
bool cppFunc(float ()[3])
{
color[0] = 1;
color[1] = 2;
color[2] = 3;
return true;
}
*** D:
On Friday, 28 April 2017 at 15:56:17 UTC, ParticlePeter wrote:
So what next? How can I interface to the cpp function?
*** C++:
bool cppFunc(float ()[3])
{
color[0] = 1;
color[1] = 2;
color[2] = 3;
return true;
}
*** D:
extern(C++) bool cppFunc(ref float[3] color);
void
Report a bug.
15 matches
Mail list logo