Template mixin / unresolved external / scope problem?

Robert M. Münch robert.muench at saphirion.com
Thu Nov 28 15:40:39 UTC 2019


I have:

a.d:
extern (C) void myFuncA();

void myFuncB() {
	myFuncA();
}

b.d:
public import a;

mixin template MYFUNCA() {
	extern (C) void myFuncA() {...}
}

c.d:
import b;

mixin MYFUNCA;
...further code...


Compiling such a structure gives me an unresolved external in a.d/myFuncB

I assume this is because the mixin get's it's own scope. Is this 
correct? How can I solve such a setup?

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster



More information about the Digitalmars-d-learn mailing list