jackjw <firstname.lastname@example.org> wrote:
We have installed the QNX Neutrino hosted PE Version 6.3.
We have been developing some code with QNX Neutrino hosted Version 6.2.1
server: init.c recv.c send.c server_main.c extern.h
gcc -lsocket init.c recv.c check.c server.c -o server
Now we want to update this codes to QNX PE Momentics IDE ,How to do and
where to and -lsocket parameter.
If you’re not using QNX projects, which your makefile suggests, you
generally have to add your library link commands at the end of the line:
qcc init.o recv.o check.o server.o -lsocket -o server
Because the gcc linker is a traditional Unix linker, and is order
dependent – that is, it only resolves out of a library symbols that
are on its list for resolution, and if it looks at the library before
your modules, it won’t have any unresolved dependencies to look for
in the library.
Note, also, I chose to use qcc rather than gcc – you can use
gcc, but it may be worth running qcc in verbose mode to see what
options it chooses as a hint for how to run gcc. In fact, I’m
not sure whether gcc will do what you want – for instance on
a Linux-hosted system, it will probably run the Linux-targeted
tools, rather than the QNX-targeted tools.
QNX Training Services