MemeTao / webrtc-native-examples

examples that demonstrate how to use webrtc native code
MIT License
46 stars 22 forks source link

Windows下编译显示缺少头文件 #9

Open LiangJunqiang opened 11 months ago

LiangJunqiang commented 11 months ago

在Windows下使用改写的命令编译src\data-channel: clang++ main.cpp libwebrtc.a -I ../../third_party/webrtc/ -I ../../third_party/webrtc/third_party/abseil-cpp/ -DWEBRTC_POSIX -lpthread -ldl 报错:

In file included from main.cpp:8:
In file included from ../../third_party/webrtc\api/create_peerconnection_factory.h:19:
In file included from ../../third_party/webrtc\api/peer_connection_interface.h:82:
In file included from ../../third_party/webrtc\api/async_dns_resolver.h:18:
In file included from ../../third_party/webrtc\rtc_base/socket_address.h:20:
../../third_party/webrtc\rtc_base/ip_address.h:15:10: fatal error: 'arpa/inet.h' file not found

静态库webrtc.lib已放到src\data-channel\,webrtc项目的头文件已提取到third_party\webrtc\。 请教一下还需要做什么才能顺利编译?

haowxums commented 9 months ago

In Windows you should use -DWEBRTC_WIN instead of -DWEBRTC_POSIX in your build command.