About strtof not sure but malloc is definitely there, must be a linker issue not a compiler one. Post the exact error and the command line you are using.
There is use or you can use the HelpViewer in photon.
Don’t assume QNX is like Linux Either you can try to port a different of grep or try something like :
find . -name “*.c” -exec grep -l “thestring” {}
/usr/include is just for convenience the include are in /usr/qnx6…/target/qnx6/usr/include/…
There are various directory for each matching version of GCC you may have (for examle 4.2.1 will add its own set of header files)
int main() {
char *p = (char *) malloc(100);
assert(p!=NULL);
strcpy(p,“23.69”);
float f = strtof(p,NULL);
return 0;
}
I compile with the following command:
QCC -V3.3.5,gcc_ntox86 testStdlib.cc -o testStdlib
And the result is:
testStdlib.cc: In function int main()': testStdlib.cc:9: error: strtof’ undeclared (first use this function)
testStdlib.cc:9: error: (Each undeclared identifier is reported only once for
each function it appears in.)
cc: /usr/qnx632/host/qnx6/x86/usr/lib/gcc-lib/i386-pc-nto-qnx6.3.0/3.3.5/cc1plus error 1