Thread overview
Windows link trouble
Jan 07, 2022
mesni
Jan 07, 2022
mesni
Jan 07, 2022
Adam D Ruppe
Jan 08, 2022
mesni
Jan 08, 2022
mesni
Jan 08, 2022
mesni
Jan 08, 2022
mesni
Jan 08, 2022
mesni
January 07, 2022

Windows: when creating dll file, ClassInfo and ModuleInfo are not exported? The linker swears specifically at *__Class or *__ModuleInfo symbols.

January 07, 2022

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.

DMD 2.98

January 07, 2022
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?
January 08, 2022
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?

lflags "/IMPLIB:gamelog.lib"
copyFiles "gamelog.lib"
copyFiles "gamelog.exp"
January 08, 2022
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

File Type: DLL

  Section contains the following exports for gamelog.dll

    00000000 characteristics
    FFFFFFFF time date stamp
        0.00 version
           1 ordinal base
          21 number of functions
          21 number of names

    ordinal hint RVA      name

          1    0 00001DC0 _D4game4Game4drawMFNfZv
          2    1 000086F2 _D4game4Game4exitMFNfZv
          3    2 00002F0E _D4game4Game4tickMFNfZv
          4    3 0000121C _D4game4Game5inputMFNfSQv9InputInfoZv
          5    4 00001875 _D4game4Game5startMFNfZv
          6    5 00007ABD _D4game4Game6updateMFNffZv
          7    6 00001FD2 _D4game4Game8setLevelMFCQw5level5LevelZv
          8    7 00004444 _D4game5level3Gui4drawMFNfZv
          9    8 00009ED5 _D4game5level3Gui4exitMFNfZv
         10    9 000099BC _D4game5level3Gui4tickMFNfZv
         11    A 00001CAD _D4game5level3Gui5inputMFNfSQBa9InputInfoZv
         12    B 00002E5A _D4game5level3Gui5startMFNfZv
         13    C 00003314 _D4game5level3Gui6updateMFNffZv
         14    D 0000232E _D4game5level5Level4drawMFNfZv
         15    E 00007F3B _D4game5level5Level4exitMFNfZv
         16    F 000031B6 _D4game5level5Level4tickMFNfZv
         17   10 00009C23 _D4game5level5Level5inputMFNfSQBc9InputInfoZv
         18   11 00003CCE _D4game5level5Level5startMFNfZv
         19   12 00005DC1 _D4game5level5Level6updateMFNffZv
         20   13 00008120 _D6render11clearScreenFNeZv
         21   14 00007EEB nfhmix_main

January 08, 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

    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();
    		}
    	}
    }

January 08, 2022

On Saturday, 8 January 2022 at 13:25:25 UTC, mesni wrote:

>

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

With export class, symbols are imported, but why didn't I have such problems on linux

January 08, 2022

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.

But export module does not work