Discussion:
how to solve this error in QNX momentics IDE ??
(too old to reply)
Hemanth Venkatappa
2014-02-03 11:05:43 UTC
Permalink
I have written a socket server program in c using QNX ide but after running a application, I am getting the following errors below.

undefined reference to `socket' MAIN.c /QNXRTOS/MyPrograms line 284
undefined reference to `bind' MAIN.c /QNXRTOS/MyPrograms line 312
undefined reference to `listen' MAIN.c /QNXRTOS/MyPrograms line 333
undefined reference to `accept' MAIN.c /QNXRTOS/MyPrograms line 353
undefined reference to `recv' MAIN.c /QNXRTOS/MyPrograms line 378


Could anyone help me in fixing this.
Nicolas
2014-02-04 08:32:37 UTC
Permalink
Post by Hemanth Venkatappa
I have written a socket server program in c using QNX ide but after running a application, I am getting the following errors below.
undefined reference to `socket' MAIN.c /QNXRTOS/MyPrograms line 284
undefined reference to `bind' MAIN.c /QNXRTOS/MyPrograms line 312
undefined reference to `listen' MAIN.c /QNXRTOS/MyPrograms line 333
undefined reference to `accept' MAIN.c /QNXRTOS/MyPrograms line 353
undefined reference to `recv' MAIN.c /QNXRTOS/MyPrograms line 378
Could anyone help me in fixing this.
You need to link the socket library to your application.

Got to Project/Properties/QNX C/C++ Project/Linker.
In Category, select "Extra libraries".
Click "Add" and type "socket".
Close the Properties dialog box and rebuild.
You're done.
a***@gmail.com
2014-06-19 11:07:03 UTC
Permalink
Post by Nicolas
Post by Hemanth Venkatappa
I have written a socket server program in c using QNX ide but after running a application, I am getting the following errors below.
undefined reference to `socket' MAIN.c /QNXRTOS/MyPrograms line 284
undefined reference to `bind' MAIN.c /QNXRTOS/MyPrograms line 312
undefined reference to `listen' MAIN.c /QNXRTOS/MyPrograms line 333
undefined reference to `accept' MAIN.c /QNXRTOS/MyPrograms line 353
undefined reference to `recv' MAIN.c /QNXRTOS/MyPrograms line 378
Could anyone help me in fixing this.
You need to link the socket library to your application.
Got to Project/Properties/QNX C/C++ Project/Linker.
In Category, select "Extra libraries".
Click "Add" and type "socket".
Close the Properties dialog box and rebuild.
You're done.
thank you very much! it helps

Loading...