Please help. I have a very simple program that is in QNX C, and I’m having problems linking Scramnet libraries to it. I have one library that I’m trying to include (libhw), and a header file to go with it (scr.h). I’ve included the include directory, and the library directory in the compiler and linker, but I still get an error. Can anyone shed some light on this?
#include <stdlib.h>
#include <stdio.h>
//#include “scr.h”
#include “temp1.h”
int main(int argc, char *argv[]) {
int temp2;
temp2 = scr_dfltr_mm(5);
temp2 = huinya(1);
printf("%i \n" , temp2);
printf(“Welcome to the Momentics IDE\n”);
return EXIT_SUCCESS;
}
make -k all --file=/workspace/EugeneProject/QMakefile16265.tmp
make -j 1 -Cx86 -fMakefile all
make[1]: Entering directory /workspace/EugeneProject/x86' make -j 1 -Co -fMakefile all make[2]: Entering directory
/workspace/EugeneProject/x86/o’
/usr/qnx630/host/qnx6/x86//usr/bin/qcc -V3.3.5,gcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I. -I/workspace/EugeneProject/x86/o -I/workspace/EugeneProject/x86 -I/workspace/EugeneProject -I/workspace/EugeneProject/usr/scramnet/inc -I/usr/qnx630/target/qnx6/usr/include /workspace/EugeneProject/EugeneProject.c
/workspace/EugeneProject/EugeneProject.c: In function main': /workspace/EugeneProject/EugeneProject.c:10: warning: implicit declaration of function
scr_dfltr_mm’
/bin/rm -f /workspace/EugeneProject/x86/o/EugeneProject
/usr/qnx630/host/qnx6/x86//usr/bin/qcc -V3.3.5,gcc_ntox86 -o/workspace/EugeneProject/x86/o/EugeneProject EugeneProject.o temp1.o -L. -L/usr/scramnet/lib -L/usr/qnx630/target/qnx6/x86/lib/gcc/3.3.5 -L/usr/qnx630/target/qnx6/x86/lib -L/usr/qnx630/target/qnx6/x86/usr/lib -lc -llibhw
/usr/qnx630/host/qnx6/x86//usr/bin/i386-pc-nto-qnx6.3.0-ld: cannot find -llibhw
cc: /usr/qnx630/host/qnx6/x86//usr/bin/i386-pc-nto-qnx6.3.0-ld error 1
make[2]: *** [/workspace/EugeneProject/x86/o/EugeneProject] Error 1
make[2]: Leaving directory /workspace/EugeneProject/x86/o' make[2]: Target
all’ not remade because of errors.
make[1]: [all] Error 2 (ignored)
make -j 1 -Co-g -fMakefile all
make[2]: Entering directory /workspace/EugeneProject/x86/o-g' /usr/qnx630/host/qnx6/x86//usr/bin/qcc -V3.3.5,gcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -I. -I/workspace/EugeneProject/x86/o -I/workspace/EugeneProject/x86/o-g -I/workspace/EugeneProject/x86 -I/workspace/EugeneProject -I/workspace/EugeneProject/usr/scramnet/inc -I/usr/qnx630/target/qnx6/usr/include -g -DVARIANT_g /workspace/EugeneProject/EugeneProject.c /workspace/EugeneProject/EugeneProject.c: In function
main’:
/workspace/EugeneProject/EugeneProject.c:10: warning: implicit declaration of function scr_dfltr_mm' /bin/rm -f /workspace/EugeneProject/x86/o-g/EugeneProject_g /usr/qnx630/host/qnx6/x86//usr/bin/qcc -V3.3.5,gcc_ntox86 -o/workspace/EugeneProject/x86/o-g/EugeneProject_g EugeneProject.o temp1.o -L. -L/usr/scramnet/lib -L/usr/qnx630/target/qnx6/x86/lib/gcc/3.3.5 -L/usr/qnx630/target/qnx6/x86/lib -L/usr/qnx630/target/qnx6/x86/usr/lib -lc -llibhw -g /usr/qnx630/host/qnx6/x86//usr/bin/i386-pc-nto-qnx6.3.0-ld: cannot find -llibhw cc: /usr/qnx630/host/qnx6/x86//usr/bin/i386-pc-nto-qnx6.3.0-ld error 1 make[2]: *** [/workspace/EugeneProject/x86/o-g/EugeneProject_g] Error 1 make[2]: Leaving directory
/workspace/EugeneProject/x86/o-g’
make[1]: Leaving directory /workspace/EugeneProject/x86' make[2]: Target
all’ not remade because of errors.
make[1]: [all] Error 2 (ignored)