webrtc-sdk / webrtc

BSD 3-Clause "New" or "Revised" License
225 stars 89 forks source link

The version compiled on mac os always reports an error #104

Open obliviosn opened 9 months ago

obliviosn commented 9 months ago

flutter_webrtc 80 issues x Undefined symbol:_OBJCCLASS$_RTCAudioTrack x Undefined symbol:_OBJCCLASS$_RTCCVPixelBuffer x Undefined symbol: OBJCCLASS$_RTCCameraVideoCapturer x Undefined symbol:_OBJCCLASS$_RTCConfigurationx Undefined symbol:_OBJCCLASS$_RTCCryptoOptionsx Undefined symbol:_OBJCCLASS$_RTCDataBuffer x Undefined symbol: OBJCCLASS$_RTCDataChannel x Undefined symbol: OBJCCLASS$RTCDataChannelConfiguration Undefined symbol: OBJCCLASS$_RTCDefaultVideoDecoderFactory Undefined symbol: x OBJCCLASS$RTCDefaultVideoEncoderFactory x Undefined symbol: OBJCCLASS$ RTCDesktopMediaList x Undefined symbol:_OBJCCLASS$RTCFrameCryptor x Undefined symbol: OBJCCLASS$RTCFrameCryptorKeyProvider Undefined symbol: x OBJC CLASS$ RTCH264ProfileLevelld xUndefined symbol:_OBJCCLASS$_RTCI420Buffer x Undefined symbol:_OBJCCLASS$_RTCIceCandidate x Undefined symbol:_OBJCCLASS$_RTCIceServer x Undefined symbol: OBJC CLASS $ RTCMediaConstraints Undefined symbol: OBJC CLASS $RTCMediaStreamTrackx Undefined symbol:_OBJCCLASS$RTCPeerConnection Undefined symbol:OBJC CLASS$ RTCPeerConnectionFactory Undefined symbol: X OBJCCLASS$_RTCPeerConnectionFactoryOptionsUndefined symbol: ![Uploading 微信图片_20231122115328.png…]()

davidliu commented 9 months ago

@hiroshihorie is this related to the prefixing work?

obliviosn commented 9 months ago

It can be compiled into a framework normally, but the sdk used is in the development stage and an error like this occurs.

hiroshihorie commented 9 months ago

Ok thanks for the information, I'll take a look.

JiaoLiu commented 9 months ago

Ok thanks for the information, I'll take a look. any updates here?

hiroshihorie commented 9 months ago

Only for macOS ? The code appears to be correct. I will make a non-prefixed build and try it out.

hiroshihorie commented 9 months ago

I compiled for macOS without prefixing (default) and it works fine.

obliviosn commented 9 months ago

I compiled for macOS without prefixing (default) and it works fine. ios is correct, but the same source code mac os has errors, Below is my compilation script。

gn gen out/macOS-x64 --args="target_os=\"mac\" target_cpu=\"x64\" is_debug=false rtc_include_tests=false rtc_use_h264=true ffmpeg_branding=\"Chrome\" is_component_build=false use_rtti=true use_custom_libcxx=true treat_warnings_as_errors=false rtc_enable_protobuf=false rtc_build_examples=false " ninja -C out/macOS-x64 mac_framework_bundle

gn gen out/macOS-arm64 --args="target_os=\"mac\" target_cpu=\"arm64\" is_debug=false rtc_include_tests=false rtc_use_h264=true ffmpeg_branding=\"Chrome\" is_component_build=false use_rtti=true use_custom_libcxx=true treat_warnings_as_errors=false rtc_enable_protobuf=false rtc_build_examples=false " ninja -C out/macOS-arm64 mac_framework_bundle

mkdir -p out/mac-x64-arm64-lib cp -R out/macOS-x64/WebRTC.framework out/mac-x64-arm64-lib/WebRTC.framework lipo -create -output out/mac-x64-arm64-lib/WebRTC.framework/WebRTC out/macOS-x64/WebRTC.framework/WebRTC out/macOS-arm64/WebRTC.framework/WebRTC

xcodebuild -create-xcframework \ -framework out/mac-x64-arm64-lib/WebRTC.framework \ -output out/WebRTC.xcframework cp LICENSE out/WebRTC.xcframework/

cd out/WebRTC.xcframework/macos-arm64_x86_64/WebRTC.framework/ mv WebRTC Versions/A/WebRTC ln -s Versions/Current/WebRTC WebRTC