File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ neither of which are good experiences.
2424## Options
2525
2626An application or library that is fine with either of libstdc++ or libc++ being
27- linked, whichever is the platform's default, should use:
27+ linked, whichever is the platform's default, should use the following in
28+ Cargo.toml:
2829
2930``` toml
3031[dependencies ]
@@ -50,6 +51,16 @@ flags from its build script can make this crate do nothing by using:
5051link-cplusplus = { version = " 1.0" , features = [" nothing" ] }
5152```
5253
54+ Lastly, make sure to add an explicit ` extern crate ` dependency to your crate
55+ root, since the link-cplusplus crate will be otherwise unused and its link flags
56+ dropped.
57+
58+ ``` rust
59+ // src/lib.rs
60+
61+ extern crate link_cplusplus;
62+ ```
63+
5364<br >
5465
5566#### License
Original file line number Diff line number Diff line change 2626//! # Options
2727//!
2828//! An application or library that is fine with either of libstdc++ or libc++
29- //! being linked, whichever is the platform's default, should use:
29+ //! being linked, whichever is the platform's default, should use the following
30+ //! in Cargo.toml:
3031//!
3132//! ```toml
3233//! [dependencies]
5152//! [dependencies]
5253//! link-cplusplus = { version = "1.0", features = ["nothing"] }
5354//! ```
55+ //!
56+ //! Lastly, make sure to add an explicit `extern crate` dependency to your crate
57+ //! root, since the link-cplusplus crate will be otherwise unused and its link
58+ //! flags dropped.
59+ //!
60+ //! ```
61+ //! // src/lib.rs
62+ //!
63+ //! extern crate link_cplusplus;
64+ //! ```
You can’t perform that action at this time.
0 commit comments