Windows link trouble
mesni
mensikovk817 at gmail.com
Sat Jan 8 13:25:25 UTC 2022
On Saturday, 8 January 2022 at 13:21:15 UTC, mesni wrote:
> On Friday, 7 January 2022 at 22:41:01 UTC, Adam D Ruppe wrote:
>> On Friday, 7 January 2022 at 20:48:17 UTC, mesni wrote:
>>> Windows: when creating dll file, ClassInfo and ModuleInfo are
>>> not exported? The linker swears specifically at *__Class or
>>> *__ModuleInfo symbols.
>>
>> nothing is exported unless you use the export keyword or a
>> module definition file.
>>
>> but they shouldn't really be needed from the outside.... what
>> exactly build command and error output are you seeing?
>
> Dump of file ..\bin\gamelog.dll
```d
class Game: InScene{
protected Level _level;
protected Gui _gui;
protected void opDispatch(string name_, Args...)(Args args){
assert(name_[0..2] == "A_");
enum name = name_[2..$];
if(_level) mixin(q{_level.}~name~"(args);");
if(_gui) mixin(q{_gui.}~name~"(args);");
}
export void setLevel(Level l){
_level = l;
}
override export{
@safe void start(){
this.A_start();
}
@safe void tick(){
this.A_tick();
}
@safe void update(float delta){
this.A_update(delta);
}
@safe void draw(){
static import render;
render.clearScreen();
this.A_draw();
}
@safe void input(InputInfo inputi){
this.A_input(inputi);
}
@safe void exit(){
this.A_exit();
}
}
}
```
More information about the Digitalmars-d-learn
mailing list