Bug 11523 – pragma(lib "x") doesn't have any effect in a static library
Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2013-11-15T15:30:15Z
Last change time
2022-04-11T17:09:25Z
Assigned to
No Owner
Creator
Xavier Bigand
Comments
Comment #0 by flamaros.xavier — 2013-11-15T15:30:15Z
A pragma(lib, "x") putted in a module that isn't not directly use by the client application doesn't make the dependency linked into the generated static library.
The work around is to report the pragma(lib, "x") declaration in the main.d module.
PS: I also think that the documentation on pragma(lib, "x") miss to explain the format that "x" must have on each platform. I am always confuse on the necessity to have the extension or not, and the "lib" prefix on linux.
Comment #1 by moonlightsentinel — 2022-04-11T17:09:25Z
*** This issue has been marked as a duplicate of issue 2776 ***