Closed kallaballa closed 2 years ago
btw. websocket code links just fine.
I figured it out. I had to add --js-library ../third/datachannel-wasm/wasm/js/webrtc.js
Indeed, you have to link the Javascript libraries, like in CMakeLists.txt.
You may also get away with -lwebrtc.js
, just like you did -lwebsocket.js
.
just -lwebrtc.js
doesn't work. thanks anyway!
I'm closing this since it seems to be solved!
I have built datachannel-wasm according to the README except i added emscripten pthread support. When i try to link like this:
I get the following errors: warning: undefined symbol: rtcAddRemoteCandidate (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcCreateDataChannel (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcCreatePeerConnection (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcDeleteDataChannel (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcDeletePeerConnection (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcGetBufferedAmount (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcGetDataChannelLabel (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcSendMessage (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcSetBufferedAmountLowCallback (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcSetBufferedAmountLowThreshold (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcSetDataChannelCallback (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcSetErrorCallback (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcSetGatheringStateChangeCallback (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcSetLocalCandidateCallback (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcSetLocalDescriptionCallback (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcSetMessageCallback (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcSetOpenCallback (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcSetRemoteDescription (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcSetSignalingStateChangeCallback (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcSetStateChangeCallback (referenced by top-level compiled C/C++ code) warning: undefined symbol: rtcSetUserPointer (referenced by top-level compiled C/C++ code)
What am i doing wrong?