I've lost libsocket* ! -where is it? please help.

hi all,

maby lost isn’t the correct word as i’m not sure if I every had it… :wink:

I’m currently trying to get a simple echo server c app compiled on QNX 6.1,
but am running into a little problem.
The following linker messages are shown:
undefined reference to ‘listen’
undefined reference to ‘accept’
undefined reference to ‘socket’
undefined reference to ‘bind’

I’ve:
-looked for libsocket* in the usr (and sub directories) directory structure
but cannot find it.
-tried installing the network DDK.
-tried installing other network apps…
-looked for the file on the internet and QNX’s website
but am still unable to find it…

any ideas?

Thanks in advance for your help.

Regards,
Grant

grant kruger wrote:

hi all,

maby lost isn’t the correct word as i’m not sure if I every had it… > :wink:

I’m currently trying to get a simple echo server c app compiled on QNX 6.1,
but am running into a little problem.
The following linker messages are shown:
undefined reference to ‘listen’
undefined reference to ‘accept’
undefined reference to ‘socket’
undefined reference to ‘bind’

I’ve:
-looked for libsocket* in the usr (and sub directories) directory structure
but cannot find it.
-tried installing the network DDK.
-tried installing other network apps…
-looked for the file on the internet and QNX’s website
but am still unable to find it…

any ideas?

Thanks in advance for your help.

Regards,
Grant

\

It is in /lib
What you want to do is to add the library when linking, ie -lsocket to
the linking line.

If you don’t have libsocket.so[.so.1][.a], you can use the pkgctl tool
to recover it
pkgctl -r /lib/libsocket.so
pkgctl -r /lib/libsocket.a
etc


/Johan

excellent.! thanks…got it working! just needed to add the -lsocket

have a great day.

regards, Grant



phearbear <phearbear@home.se> wrote in message
news:3D685D66.7090801@home.se

grant kruger wrote:
hi all,

maby lost isn’t the correct word as i’m not sure if I every had it…
:wink:

I’m currently trying to get a simple echo server c app compiled on QNX
6.1,
but am running into a little problem.
The following linker messages are shown:
undefined reference to ‘listen’
undefined reference to ‘accept’
undefined reference to ‘socket’
undefined reference to ‘bind’

I’ve:
-looked for libsocket* in the usr (and sub directories) directory
structure
but cannot find it.
-tried installing the network DDK.
-tried installing other network apps…
-looked for the file on the internet and QNX’s website
but am still unable to find it…

any ideas?

Thanks in advance for your help.

Regards,
Grant






It is in /lib
What you want to do is to add the library when linking, ie -lsocket to
the linking line.

If you don’t have libsocket.so[.so.1][.a], you can use the pkgctl tool
to recover it
pkgctl -r /lib/libsocket.so
pkgctl -r /lib/libsocket.a
etc


/Johan