Shared library question

Dibyendu Majumdar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jan 22 14:06:35 PST 2016


Hi

I am trying to create a simple shared library that exports a D 
function, but when I try to link to it I get errors such as:

  error LNK2001: unresolved external symbol _D7xxx12__ModuleInfoZ

Here xxx is the module inside the shared library.

I am using DMD and MS LINKER (Windows 64-bit) to create the DLL / 
LIB files.
Then I am using DMD to build the executable.

In the test program I do following:

module app;
import xxx;

void main() {
   testing(); /* exported from xxx */
}

I cannot figure out what I am doing wrong - any help appreciated.

Regards


More information about the Digitalmars-d-learn mailing list