gpt4 book ai didi

Eclipse 中的编译时错误 : "undefined reference to ` sctp_recvmsg'"

转载 作者:行者123 更新时间:2023-11-30 16:49:19 26 4
gpt4 key购买 nike

如何在 Linux ubuntu 中使用 Eclipse 构建 SCTP client.c 和 server.c 示例代码?

在终端中我可以构建

gcc -Wall sctpclient.c -lsctp -o sctpclient

但在 Eclipse 中我收到“对 `sctp_recvmsg' 的 undefined reference ”。

我不知道在 Eclipse IDE 中添加“-lsctp”开关。

最佳答案

我在Eclipse IDE中找到了正确的路径,您必须将-lsctp参数添加到以下路径:

Project properties->C/C++ Build->Setting->GCC C Linker->Miscellaneous->Other objects

并在 NetBeans IDE 中添加参数:

Project properties->Build->Linker->Additional Options

关于Eclipse 中的编译时错误 : "undefined reference to ` sctp_recvmsg'",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42626881/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com