Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upcpp_link_stdlib/cpp_set_stdlib examples #207
Conversation
alexcrichton
reviewed
Jul 16, 2017
| /// .file("src/foo.c") | ||
| /// .shared_flag(true) | ||
| /// .cpp_set_stdlib(Some("stdc++")) | ||
| /// .compile("libfoo.so"); |
This comment has been minimized.
This comment has been minimized.
alexcrichton
Jul 16, 2017
Owner
Hm I'm realizing now these have shared_flag, but how come? I think this as-is will fail at runtime because this doesn't support creating libfoo.so afaik.
This comment has been minimized.
This comment has been minimized.
opilar
Jul 19, 2017
Author
Contributor
Why? Static library doesn't link. Or you talk about different header files?
This comment has been minimized.
This comment has been minimized.
alexcrichton
Jul 20, 2017
Owner
Oh well so this option is intended for the C++ standard a piece of code is compiled with, but cpp_set_stdlib and such aren't really relevant for linkage other than telling rustc it may want a different C++ standard library.
Perhaps the shared_flag could be removed and libfoo.so could be changed to libfoo.a?
This comment has been minimized.
This comment has been minimized.
dtolnay
reviewed
Jul 31, 2017
dtolnay
reviewed
Jul 31, 2017
| /// gcc::Config::new() | ||
| /// .file("src/foo.c") | ||
| /// .shared_flag(true) | ||
| /// .cpp_set_stdlib(Some("stdc++")) |
This comment has been minimized.
This comment has been minimized.
dtolnay
Jul 31, 2017
I would expect the example for cpp_link_stdlib to call cpp_link_stdlib, not cpp_set_stdlib.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton @dtolnay thank you for your help. |
alexcrichton
merged commit 6021105
into
alexcrichton:master
Aug 9, 2017
This comment has been minimized.
This comment has been minimized.
|
|
opilar commentedJul 15, 2017
Resolves #179