Problems compiling the C-example for USB ADC-11

 
Post new topic   Reply to topic    Pico Technology Forum Index -> C and C++
Author Message
aaroe
Active User
Active User


Joined: 27 Dec 2006
Posts: 6
Location: Aalborg, Denmark.

PostPosted: Wed Aug 01, 2007 9:38 am    Post subject: Problems compiling the C-example for USB ADC-11 Reply with quote

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:

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
Back to top
physicsfaith
Advanced User
Advanced User


Joined: 12 Jul 2007
Posts: 10
Location: Manhattan, KS

PostPosted: Mon Aug 06, 2007 7:45 pm    Post subject: Reply with quote

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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> C and C++
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group