char[]/ubyte[] compile error

Damien Gibson via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Wed Jul 12 14:14:09 PDT 2017


Hi all. As I'm sure you all know documentation is hit and miss 
for if it exists or is good with DLang (And compilers) and this 
issue i'm not totally sure if either or at this point.

C++ cooperation with dlls made in dmd was pretty nonexistant from 
all my previous attempts and LDC works fine.

However in the case of what i'm currently making it requires the 
use of a byte array (0-255) and i've tried either char[] or 
ubyte[] and on either of them the compiler always returned this 
error:

'Error: Internal Compiler Error: unsupported type char[]'

a direct method of reproducing this is:

1) Make a shared library(dll).
2) Generate in some code file - Module Name,
                                 export:extern(C++):,
                                 use above type as return or param;
3) Compile.

I haven't had any luck finding documentation as to why this may 
be or what it extends to if it isnt just arrays of those types 
nor do I have any luck finding alternative methods to accomplish 
the same tasks those 2 known types are required for.

What I would like help for basicly is just to find out if maybe 
there is limited usage in there and what alternative approach 
someone else may have to the arrays. Thanks.


More information about the digitalmars-d-ldc mailing list