D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 11523 - pragma(lib "x") doesn't have any effect in a static library
Summary: pragma(lib "x") doesn't have any effect in a static library
Status: RESOLVED DUPLICATE of issue 2776
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P2 minor
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-15 15:30 UTC by Xavier Bigand
Modified: 2022-04-11 17:09 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Xavier Bigand 2013-11-15 15:30:15 UTC
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 moonlightsentinel 2022-04-11 17:09:25 UTC

*** This issue has been marked as a duplicate of issue 2776 ***