Search code examples
csocketsubuntueclipse-cdtsctp

compile time error in Eclipse: "undefined reference to `sctp_recvmsg'"


How to build SCTP client.c and server.c sample code with Eclipse in Linux ubuntu?

In terminal I can build with

gcc -Wall sctpclient.c -lsctp -o sctpclient

but in Eclipse I received "undefined reference to `sctp_recvmsg'".

I don't know to add the "-lsctp" switch in Eclipse IDE.


Solution

  • I found the right path in Eclipse IDE, You must add -lsctp parameter to below path:

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

    And in NetBeans IDE add parameter to:

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