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

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

Open
LiangJunqiang opened this issue Oct 23, 2023 · 1 comment
Open

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

LiangJunqiang opened this issue Oct 23, 2023 · 1 comment

Comments

@LiangJunqiang
Copy link

在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
Copy link

haowxums commented Dec 1, 2023

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

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

2 participants