gcc and qcc

Recently I’ve written a pure ANSI C++ console application and compiled it
under Win32 and BeOS with no difficulties. (Using Borland 5.5 and gcc.)
However, QNX’s gcc did not act as smooth as it in BeOS, complaining about
the pow() library function (which I used indeed), but qcc worked fine. I
still wonder what the reason could be.
This part of the story would not bother me (after all, the QNX port works),
but I wanted to move on to Red Hat Linux, where I could not find qcc, and
gcc drops the same message as in QNX.
It seems I can’t avoid compiling with gcc properly. But how?

Daniel Stocker

Daniel Stocker <stocker_d@hotmail.com> wrote:

Recently I’ve written a pure ANSI C++ console application and compiled it
under Win32 and BeOS with no difficulties. (Using Borland 5.5 and gcc.)
However, QNX’s gcc did not act as smooth as it in BeOS, complaining about
the pow() library function (which I used indeed), but qcc worked fine. I
still wonder what the reason could be.
This part of the story would not bother me (after all, the QNX port works),
but I wanted to move on to Red Hat Linux, where I could not find qcc, and
gcc drops the same message as in QNX.
It seems I can’t avoid compiling with gcc properly. But how?

qcc automatically adds in the math library for you, if you are using
C++.

For gcc, you should add -lm to your link line to get libm.so linked
in as well (this contains pow())

cburgess@qnx.com