Dynamic library loading gives error about importing a module

Tolga Cakiroglu tcak at pcak.com
Wed Feb 19 21:07:58 PST 2014


>
> Simply "import"ing should work; doing that should not bring 
> definitions to the code. However, one side should also include 
> the module during its build.
>
> Have you included the module on both the program's and 
> library's builds?
>
> Ali

Hi Ali, Both of them have normal import for that module. I 
actually used the import as "private import" in the DLL file in 
case it would be helpful, though no chance.

Also both of them have the link to that imported library. If I 
didn't, compiler would give error message and wouldn't compile 
already. So, I am sure about this.


> Could be this?
> https://d.puremagic.com/issues/show_bug.cgi?id=11543
> Workaround - compile with -release

Both library and the programme are compiled with
-w -wi -inline -O -release -noboundscheck

Martin is just suggesting to use it I think. It is no change at 
all.


BTW, just for information, Posix "dlOpen" function is used in 
this operation. But this is a system call already, and shouldn't 
be causing fatal/this error.


More information about the Digitalmars-d-learn mailing list