Error building Qt + libwebrtc
-
wrote on 27 Aug 2024, 12:47 last edited by
Greetings, I'm trying to build a basic console project using Qt6 (Core, Multimedia and Network modules) plus google libwebrtc library.
Compile output error:
In file included from /Users/..../test//services/webrtctest.cpp:1:
In file included from /Users/..../test//services/webrtctest.h:5:
In file included from /Users/..../test//build/Qt_6_7_2_for_macOS-Debug/_deps/3rd-party-lib/include/mediasoupclient.hpp:4:
In file included from /Users/..../test//build/Qt_6_7_2_for_macOS-Debug/_deps/3rd-party-lib/include/Device.hpp:4:
In file included from /Users/..../test//build/Qt_6_7_2_for_macOS-Debug/_deps/3rd-party-lib/include/Handler.hpp:4:
In file included from /Users/..../test//build/Qt_6_7_2_for_macOS-Debug/_deps/3rd-party-lib/include/PeerConnection.hpp:5:
In file included from /Users/.../webrtc-checkout/src/api/peer_connection_interface.h:83:
In file included from /Users/.../webrtc-checkout/src/api/async_resolver_factory.h:14:
In file included from /Users/.../webrtc-checkout/src/rtc_base/async_resolver_interface.h:17:
/Users/.../webrtc-checkout/src/rtc_base/third_party/sigslot/sigslot.h:327:17: error: expected ')'
void emit(Args... args) const {
^
/Users/.../webrtc-checkout/src/rtc_base/third_party/sigslot/sigslot.h:327:12: note: to match this '('
void emit(Args... args) const {
^Any advise? Thanks!
-
Greetings, I'm trying to build a basic console project using Qt6 (Core, Multimedia and Network modules) plus google libwebrtc library.
Compile output error:
In file included from /Users/..../test//services/webrtctest.cpp:1:
In file included from /Users/..../test//services/webrtctest.h:5:
In file included from /Users/..../test//build/Qt_6_7_2_for_macOS-Debug/_deps/3rd-party-lib/include/mediasoupclient.hpp:4:
In file included from /Users/..../test//build/Qt_6_7_2_for_macOS-Debug/_deps/3rd-party-lib/include/Device.hpp:4:
In file included from /Users/..../test//build/Qt_6_7_2_for_macOS-Debug/_deps/3rd-party-lib/include/Handler.hpp:4:
In file included from /Users/..../test//build/Qt_6_7_2_for_macOS-Debug/_deps/3rd-party-lib/include/PeerConnection.hpp:5:
In file included from /Users/.../webrtc-checkout/src/api/peer_connection_interface.h:83:
In file included from /Users/.../webrtc-checkout/src/api/async_resolver_factory.h:14:
In file included from /Users/.../webrtc-checkout/src/rtc_base/async_resolver_interface.h:17:
/Users/.../webrtc-checkout/src/rtc_base/third_party/sigslot/sigslot.h:327:17: error: expected ')'
void emit(Args... args) const {
^
/Users/.../webrtc-checkout/src/rtc_base/third_party/sigslot/sigslot.h:327:12: note: to match this '('
void emit(Args... args) const {
^Any advise? Thanks!
wrote on 27 Aug 2024, 13:16 last edited by Pl45m4@mvquezm said in Error building Qt + libwebrtc:
/Users/.../webrtc-checkout/src/rtc_base/third_party/sigslot/sigslot.h:327:17: error: expected ')'
void emit(Args... args) const {
^
/Users/.../webrtc-checkout/src/rtc_base/third_party/sigslot/sigslot.h:327:12: note: to match this '('
void emit(Args... args) const {I have zero knowledge about
libwebrtc
, but it looks like this thirdparty lib is using functions/methods and other symbols namedemit ...
in its own signaling system called "sigslot".
emit
is a preprocessor macro which actually expands to "nothing", used by Qt's Signal / Slot mechanism.In case there are conficts with thirdparty stuff, you could try to configure your project using the
QT_NO_KEYWORDS
optionAdd one of those to your CMake:
target_compile_definitions(Your_Target PRIVATE QT_NO_KEYWORDS)
or
ADD_DEFINITIONS(-DQT_NO_KEYWORDS)
When emitting a Qt signal, you can use
Q_EMIT
instead or omit it completely.
Same forsignals
orslots
in your headers... use theirQ_
siblings :)Read here for further info
1/3