Timothy Baldridge
Timothy Baldridge

Reputation: 10653

Linking to Static libraries

Coming from a C/C++ background. What is the proper way to link a D static (or dynamic) library to a D .exe file? Can I simply "import" the module from the library and then link to the .lib file at compile time?

Upvotes: 7

Views: 549

Answers (1)

Ellery Newcomer
Ellery Newcomer

Reputation: 1644

Yes, for static libs, but you also need to pass the library's sources or *.di files to the compiler via -I.

I think D does not have good (or any?) support for dynamic libs at present, though it is high on the todo list.

Upvotes: 6

Related Questions