How to call a function from a dll created with d ?

mw mingwu at gmail.com
Fri Jul 1 21:02:20 UTC 2022


On Friday, 1 July 2022 at 19:11:16 UTC, Vinod KC wrote:
> Hi all,
> I have created a dll file with this code.
> ```d
> module dimedll;
> 
>
> export void testFunc() {
>     writeln("This is from dll");
> }
> ```
> 
>
> void main() { 	
> 	log("Lets build our own ime");
> 	testFunc();		
> }
> ```
> 
> ```
> dime.obj : error LNK2019: unresolved external symbol 
> __D4dime8testFuncFZv referenced in


I think the problem is the linker looking for dime.testFunc, 
while your lib function  is dimedll.testFunc



More information about the Digitalmars-d-learn mailing list