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
example :
makefile
server: init.c recv.c send.c server_main.c extern.h
gcc -lsocket init.c recv.c check.c server.c -o server
clean:
rm server
Now we want to update this codes to QNX PE Momentics IDE ,How to do and
where to and -lsocket parameter.
In the project properties there is an option to add extra libs.
- Right-click on the project (in the C/C++ projects view)
- Select properties
- Select QNX C/C++ Project
- Click on the Linker tab
- Select “Extra Libs” in the Category drop down box
- Click Add and specify the lib
Regards,
Joe
jackjw <jackwj@heinfo.net> wrote in message news:cp3lsq$pd4$1@inn.qnx.com…
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
example :
makefile
server: init.c recv.c send.c server_main.c extern.h
gcc -lsocket init.c recv.c check.c server.c -o server
clean:
rm server
Now we want to update this codes to QNX PE Momentics IDE ,How to do and
where to and -lsocket parameter.
jackjw <jackwj@heinfo.net> 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
example :
makefile
server: init.c recv.c send.c server_main.c extern.h
gcc -lsocket init.c recv.c check.c server.c -o server
clean:
rm 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:
e.g.
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.
-David
David Gibbs
QNX Training Services
dagibbs@qnx.com