I'm working on small piece of software for the ADC-11 (USB) which basicly just has to retrieve the values from each channel and store them in a textfile when being run.
Before starting with this, I want to get familiar with the C-examples provided, but they are giving me a bit of problem when it comes to compiling.
I'm using Bloodshed Dev-C since, as far as I can see, Microsoft Visual Exress is only for C++ - please correct me if I'm wrong.
When I try to compile the USBADC11CON.c file, the compiler stops and this is the content of the log:
Code: Select all
Compiler: Default compiler
Building Makefile: "C:\Documents and Settings\Christian\Dokumenter\Projects\C USB\Makefile.win"
Executing make...
make.exe -f "C:\Documents and Settings\Christian\Dokumenter\Projects\C USB\Makefile.win" all
gcc.exe -c USBADC11CON.C -o USBADC11CON.o -I"C:/Dev-Cpp/include" -pg
In file included from USBADC11CON.C:6:
usbadc11api.h:156:94: warning: no newline at end of file
USBADC11CON.C: In function `void collect_block_triggered()':
USBADC11CON.C:172: warning: passing negative value `-0x00000000a' for converting 8 of `short int UsbAdc11SetTrigger(short int, short unsigned int, short unsigned int, short unsigned int, short unsigned int, short unsigned int, short unsigned int, short unsigned int)'
USBADC11CON.C: In function `void collect_streaming()':
USBADC11CON.C:344: warning: passing negative value `-0x00000000a' for converting 8 of `short int UsbAdc11SetTrigger(short int, short unsigned int, short unsigned int, short unsigned int, short unsigned int, short unsigned int, short unsigned int, short unsigned int)'
USBADC11CON.C: In function `void collect_individual()':
USBADC11CON.C:433: error: invalid conversion from `int' to `ADC11_INPUTS'
USBADC11CON.C:433: error: initializing argument 2 of `short int UsbAdc11GetValue(short int, ADC11_INPUTS, short unsigned int*)'
USBADC11CON.C:433: error: invalid conversion from `short int*' to `short unsigned int*'
USBADC11CON.C:433: error: initializing argument 3 of `short int UsbAdc11GetValue(short int, ADC11_INPUTS, short unsigned int*)'
USBADC11CON.C: At global scope:
USBADC11CON.C:450: error: `main' must return `int'
USBADC11CON.C: In function `int main(...)':
USBADC11CON.C:488: error: `toupper' undeclared (first use this function)
USBADC11CON.C:488: error: (Each undeclared identifier is reported only once for each function it appears in.)
make.exe: *** [USBADC11CON.o] Error 1
Execution terminated
Hope someone more experienced with this kind of work can guide me through. All kinds of suggestions and advises will be greatly appreciated.
Yours sincerely
Christian Rasmussen