Using D libs in C
Dainius (GreatEmerald)
pastas4 at gmail.com
Tue Mar 29 12:07:31 PDT 2011
All right, I solved that part of the problem by creating a linked
list. However, getting the string out of D is still problematic,
namely because toStringz() gives me an immutable char*, and I don't
seem to be able to pass those, since I can't assign those to immutable
variables outside their constructors. Also, if I use this:
//D:
void GetString()
{
ReceiveString(toStringz(StringD));
}
//C:
extern(C) void ReceiveString(char* String)
{
StringC = String;
}
DMD gives me "Error: undefined identifier ReceiveString" for some reason.
More information about the Digitalmars-d-learn
mailing list