File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " edlib_rs"
3
- version = " 0.1.1 "
3
+ version = " 0.1.2 "
4
4
authors = [" jeanpierre.both@gmail.com" ]
5
5
edition = " 2018"
6
6
build = " build.rs"
Original file line number Diff line number Diff line change @@ -32,13 +32,21 @@ fn main() {
32
32
let wrapper_path = out_path. join ( "wrapper.h" ) ;
33
33
//
34
34
write_wrapper ( & wrapper_path) ;
35
- //
35
+ // adapted fix from sam217pa. libstdc++ name varies...
36
+ let lib_std : & str ;
37
+ if cfg ! ( target_os = "macos" ) {
38
+ lib_std = "cargo:rustc-link-lib=c++" ;
39
+ }
40
+ else {
41
+ lib_std = "cargo:rustc-link-lib=stdc++" ;
42
+ }
43
+
36
44
let mut libdir = String :: from ( "cargo:rustc-link-search=" ) ;
37
45
libdir. push_str ( out_path. to_str ( ) . unwrap ( ) ) ;
38
46
libdir. push_str ( "/lib" ) ;
39
47
println ! ( "{}" , libdir) ;
40
48
println ! ( "cargo:rustc-link-lib=edlib" ) ;
41
- println ! ( "cargo:rustc-link-lib=stdc++" ) ;
49
+ println ! ( "{}" , lib_std ) ;
42
50
43
51
// The bindgen::Builder is the main entry point
44
52
// to bindgen, and lets you build up options for
You can’t perform that action at this time.
0 commit comments