0

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.

Jabberwocky
  • 48,281
  • 17
  • 65
  • 115
Dev
  • 15
  • 8
  • 2
    _[How to set compiler settings in Eclipse](https://codeyarns.com/2014/01/14/how-to-change-compiler-options-of-build-in-eclipse-cdt/)_ – ryyker Mar 06 '17 at 13:33
  • Project properties->C/C++ General->Paths and symbols – LPs Mar 06 '17 at 13:34
  • 2
    Possible duplicate of [How to add a library to an Eclipse project](http://stackoverflow.com/questions/1351712/how-to-add-a-library-to-an-eclipse-project) –  Mar 06 '17 at 13:35

1 Answers1

0

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
Dev
  • 15
  • 8