Problems compiling the C-example for USB ADC-11

Post your C and C++ discussions here
Post Reply
aaroe
User
User
Posts: 6
Joined: Wed Dec 27, 2006 10:41 am
Location: Aalborg, Denmark.

Problems compiling the C-example for USB ADC-11

Post by aaroe »

Hi there.

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
[/size]

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

physicsfaith
Active User
Active User
Posts: 10
Joined: Thu Jul 12, 2007 3:26 pm
Location: Manhattan, KS

Post by physicsfaith »

MS Visual Express will compile .c extension files as C programs. Go ahead and use it. But, make sure you download the Software Development Kit (SDK) as well and follow the instructions to modify the appropriate files to activate all of the things you need to compile this software.

Post Reply