linux - netinet/sctp.h : No such file or directory

标签 linux gcc sctp

我无法将其包含在我的任何文件中。编译的时候总是失败。 我安装了 lksctp-tools 软件包。

我运行

     gcc -Wall -lsctp -o client admin.c deserializer.c input_parser.c main.c receive_response.c send_request.c serializer.c utils.c

我得到:

main.c:2:10: fatal error: netinet/sctp.h: No such file or directory
#include <netinet/sctp.h>
      ^~~~~~~~~~~~~~~~
compilation terminated.

我正在使用 Fedora,我不知道这是否会改变什么。 然而该项目似乎在 CLion 上运行良好。

最佳答案

在ubuntu上需要安装libsctp-dev

sudo apt install libsctp-dev

关于linux - netinet/sctp.h : No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53137250/

相关文章:

Python - 我如何从终端获取所有打印和标准输出以便我可以制作日志?

c - 海湾合作委员会 + C : Keeping Functions in order in the binary file

c++ - 对于已定义的符号,静态库链接问题 "Undefined symbols"

C++ 网络套接字、SCTP 和数据包大小

macos - SCTP 在 OSX 上缺少包含文件?

c - SCTP回显服务器代码: Byteorder warning messages

android - Game Closure DevKit › native android build ant 错误

linux - 注册手册 MAC 地址

c - 如何计算传输和接收的网络利用率

ruby - 使用 Xcode 4.3 在 OS X Lion 上安装 Ruby <1.9.3 的正确方法是什么?