(In qnx host, so use english)
Mr xtang:
First thanks so much for your guidance on the serial port communication. I will try my best to correct my code following your suggestions.
Sorry to trouble you but this A/D driver problem has confused me about these two days. Pls point me the road to rome.
Just as I described in one former subject, the A/D card provide a universal driver for QNX.
after “tar”, I can get a header(dscud.h) and a library(libdscud5.a). I have checked the header file, all the functions I will use in my programe are listed in it and I think it do the initialization job.
First I copy the header file to the /usr/include foder(I debug and run the .c code in the local host). Then I include the dscud.h at the beginning of the source code.Its ok.
But how can I include the .a library.Actually it is a long time problem for me because I could never see the .a and .so library in the “C/C++ project” perspective in my IDE.
I also tried 1).properties->library
paths->/opt/dscud5 (which is the location of the library).
2).copy the (.a)file into /usr/lib & /x86/lib and then build in IDE
But no use. Actually I am not clear how to use the properties to add a new library. (If ok, please give me a guidance).The code could not recognize the functions listed in the <dscud.h>.
So please help me where I make mistake? Do I put the .a in the wrong folder or sth else?
And if not bothering you too much, could you guide me how to add a new library into a project in the IDE and then show these in the “C/C++” perspective?
Actually I also try the cmd line compiling according the manufacture’s notes:
$ gcc /root/workspace/daqtest/daqtest.c -o -I/opt/dscud5 -L/opt/dscud5 -llibdscud5
but get the following:
gcc /root/workspace/daqtest/daqtest.c -o daqtest -I /opt/dscud5 -L /opt/dscud5 -llibdscud5
/root/workspace/daqtest/daqtest.c: In function `PeriodicThread’:
/root/workspace/daqtest/daqtest.c:49: warning: return makes pointer from integer without a cast
/root/workspace/daqtest/daqtest.c:60: warning: return makes pointer from integer without a cast
/root/workspace/daqtest/daqtest.c:90: warning: return makes pointer from integer without a cast
/root/workspace/daqtest/daqtest.c:102: warning: return makes pointer from integer without a cast
/root/workspace/daqtest/daqtest.c:118: warning: return makes pointer from integer without a cast
/root/workspace/daqtest/daqtest.c:125: warning: return makes pointer from integer without a cast
/usr/bin/ntox86-ld: cannot find -llibdscud5
collect2: ld returned 1 exit status
I am totally confused and dont know why QNX cant find the .a file. Could you give a explanation again?
Sorry to trouble you too much! ANd Many thanks again!!!