Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build for Android and iOS #1

Open
leasual opened this issue Oct 17, 2022 · 0 comments
Open

How to build for Android and iOS #1

leasual opened this issue Oct 17, 2022 · 0 comments

Comments

@leasual
Copy link

leasual commented Oct 17, 2022

Hi, when i build for iOS, it has some issue as below:
`--- stdout
cargo:rustc-link-search=/Users/james/RustProjects/pjsip-rust/pjlibs/ios/lib
cargo:rustc-link-lib=g7221codec-arm-apple-darwin_ios
cargo:rustc-link-lib=pjsip-arm-apple-darwin_ios
cargo:rustc-link-lib=gsmcodec-arm-apple-darwin_ios
cargo:rustc-link-lib=pjsip-simple-arm-apple-darwin_ios
cargo:rustc-link-lib=ilbccodec-arm-apple-darwin_ios
cargo:rustc-link-lib=pjsip-ua-arm-apple-darwin_ios
cargo:rustc-link-lib=pj-arm-apple-darwin_ios
cargo:rustc-link-lib=pjsua-arm-apple-darwin_ios
cargo:rustc-link-lib=pjlib-util-arm-apple-darwin_ios
cargo:rustc-link-lib=pjsua2-arm-apple-darwin_ios
cargo:rustc-link-lib=pjmedia-arm-apple-darwin_ios
cargo:rustc-link-lib=resample-arm-apple-darwin_ios
cargo:rustc-link-lib=pjmedia-audiodev-arm-apple-darwin_ios
cargo:rustc-link-lib=speex-arm-apple-darwin_ios
cargo:rustc-link-lib=pjmedia-codec-arm-apple-darwin_ios
cargo:rustc-link-lib=srtp-arm-apple-darwin_ios
cargo:rustc-link-lib=pjmedia-videodev-arm-apple-darwin_ios
cargo:rustc-link-lib=webrtc-arm-apple-darwin_ios
cargo:rustc-link-lib=pjnath-arm-apple-darwin_ios
cargo:rustc-link-lib=yuv-arm-apple-darwin_ios
cargo:rustc-link-lib=pjsdp-arm-apple-darwin_ios

--- stderr
./pjlibs/ios/include/pj/config.h:303:5: error: "Please specify target machine."
./pjlibs/ios/include/pj/config.h:1340:4: error: "PJ_HAS_PENTIUM is not defined!"
./pjlibs/ios/include/pj/config.h:1344:4: error: "PJ_IS_LITTLE_ENDIAN is not defined!"
./pjlibs/ios/include/pj/config.h:1348:4: error: "PJ_IS_BIG_ENDIAN is not defined!"
./pjlibs/ios/include/pj/compat/assert.h:29:12: error: 'assert.h' file not found with include; use "quotes" instead
./pjlibs/ios/include/pj/compat/ctype.h:29:12: error: 'ctype.h' file not found with include; use "quotes" instead
./pjlibs/ios/include/pj/ctype.h:48:53: warning: implicitly declaring library function 'isalnum' with type 'int (int)' [-Wimplicit-function-declaration]
./pjlibs/ios/include/pj/ctype.h:48:53: note: include the header <ctype.h> or explicitly provide a declaration for 'isalnum'
./pjlibs/ios/include/pj/ctype.h:57:53: warning: implicitly declaring library function 'isalpha' with type 'int (int)' [-Wimplicit-function-declaration]
./pjlibs/ios/include/pj/ctype.h:57:53: note: include the header <ctype.h> or explicitly provide a declaration for 'isalpha'
./pjlibs/ios/include/pj/ctype.h:75:53: warning: implicitly declaring library function 'isdigit' with type 'int (int)' [-Wimplicit-function-declaration]
./pjlibs/ios/include/pj/ctype.h:75:53: note: include the header <ctype.h> or explicitly provide a declaration for 'isdigit'
./pjlibs/ios/include/pj/ctype.h:84:53: warning: implicitly declaring library function 'isspace' with type 'int (int)' [-Wimplicit-function-declaration]
./pjlibs/ios/include/pj/ctype.h:84:53: note: include the header <ctype.h> or explicitly provide a declaration for 'isspace'
./pjlibs/ios/include/pj/ctype.h:93:53: warning: implicitly declaring library function 'islower' with type 'int (int)' [-Wimplicit-function-declaration]
./pjlibs/ios/include/pj/ctype.h:93:53: note: include the header <ctype.h> or explicitly provide a declaration for 'islower'
./pjlibs/ios/include/pj/ctype.h:103:53: warning: implicitly declaring library function 'isupper' with type 'int (int)' [-Wimplicit-function-declaration]
./pjlibs/ios/include/pj/ctype.h:103:53: note: include the header <ctype.h> or explicitly provide a declaration for 'isupper'
./pjlibs/ios/include/pj/ctype.h:119:53: warning: implicitly declaring library function 'tolower' with type 'int (int)' [-Wimplicit-function-declaration]
./pjlibs/ios/include/pj/ctype.h:119:53: note: include the header <ctype.h> or explicitly provide a declaration for 'tolower'
./pjlibs/ios/include/pj/ctype.h:126:53: warning: implicitly declaring library function 'toupper' with type 'int (int)' [-Wimplicit-function-declaration]
./pjlibs/ios/include/pj/ctype.h:126:53: note: include the header <ctype.h> or explicitly provide a declaration for 'toupper'
./pjlibs/ios/include/pj/ctype.h:135:53: warning: implicitly declaring library function 'isxdigit' with type 'int (int)' [-Wimplicit-function-declaration]
./pjlibs/ios/include/pj/ctype.h:135:53: note: include the header <ctype.h> or explicitly provide a declaration for 'isxdigit'
./pjlibs/ios/include/pj/compat/setjmp.h:29:12: error: 'setjmp.h' file not found with include; use "quotes" instead
./pjlibs/ios/include/pj/compat/setjmp.h:30:12: error: unknown type name 'jmp_buf'
./pjlibs/ios/include/pj/compat/string.h:30:13: error: 'string.h' file not found with include; use "quotes" instead
./pjlibs/ios/include/pj/compat/string.h:39:10: fatal error: 'stdio.h' file not found
clang diag: ./pjlibs/ios/include/pj/ctype.h:48:53: warning: implicitly declaring library function 'isalnum' with type 'int (int)' [-Wimplicit-function-declaration]
clang diag: ./pjlibs/ios/include/pj/ctype.h:57:53: warning: implicitly declaring library function 'isalpha' with type 'int (int)' [-Wimplicit-function-declaration]
clang diag: ./pjlibs/ios/include/pj/ctype.h:75:53: warning: implicitly declaring library function 'isdigit' with type 'int (int)' [-Wimplicit-function-declaration]
clang diag: ./pjlibs/ios/include/pj/ctype.h:84:53: warning: implicitly declaring library function 'isspace' with type 'int (int)' [-Wimplicit-function-declaration]
clang diag: ./pjlibs/ios/include/pj/ctype.h:93:53: warning: implicitly declaring library function 'islower' with type 'int (int)' [-Wimplicit-function-declaration]
clang diag: ./pjlibs/ios/include/pj/ctype.h:103:53: warning: implicitly declaring library function 'isupper' with type 'int (int)' [-Wimplicit-function-declaration]
clang diag: ./pjlibs/ios/include/pj/ctype.h:119:53: warning: implicitly declaring library function 'tolower' with type 'int (int)' [-Wimplicit-function-declaration]
clang diag: ./pjlibs/ios/include/pj/ctype.h:126:53: warning: implicitly declaring library function 'toupper' with type 'int (int)' [-Wimplicit-function-declaration]
clang diag: ./pjlibs/ios/include/pj/ctype.h:135:53: warning: implicitly declaring library function 'isxdigit' with type 'int (int)' [-Wimplicit-function-declaration]
thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("./pjlibs/ios/include/pj/config.h:303:5: error: "Please specify target machine."\n./pjlibs/ios/include/pj/config.h:1340:4: error: "PJ_HAS_PENTIUM is not defined!"\n./pjlibs/ios/include/pj/config.h:1344:4: error: "PJ_IS_LITTLE_ENDIAN is not defined!"\n./pjlibs/ios/include/pj/config.h:1348:4: error: "PJ_IS_BIG_ENDIAN is not defined!"\n./pjlibs/ios/include/pj/compat/assert.h:29:12: error: 'assert.h' file not found with include; use "quotes" instead\n./pjlibs/ios/include/pj/compat/ctype.h:29:12: error: 'ctype.h' file not found with include; use "quotes" instead\n./pjlibs/ios/include/pj/compat/setjmp.h:29:12: error: 'setjmp.h' file not found with include; use "quotes" instead\n./pjlibs/ios/include/pj/compat/setjmp.h:30:12: error: unknown type name 'jmp_buf'\n./pjlibs/ios/include/pj/compat/string.h:30:13: error: 'string.h' file not found with include; use "quotes" instead\n./pjlibs/ios/include/pj/compat/string.h:39:10: fatal error: 'stdio.h' file not found\n")', build.rs:89:10
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace`

Do you have any idea to solve these issue? Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant