ctl_api.h - error when compiling
Hi,
I'm experimenting with some ctl functions and have come across a problem:
If I "#include ctl_api.h" in my source compilation breaks of with an error and complains about:
>> ctl_api.h expected ';',':', or ')' before numeric constant <<
The offending place in ctl_api.h is:
// Set/Clear the leds on the board
void ctl_board_set_leds(unsigned set);
I suspect a missing 'int' after the 'unsigned'.
Now, CrossWorks keeps me from overwriting the original file so I've stopped in my tracks:
Bug or misunderstanding on my side? :)
Thanks,
Christoph
-
Let me re-phrase that ;)
It's very probably a typical beginner's error: I added an include file and expected the compiler to find the functions somehow without adding the source itself. Without the include I got an "implicit definition" warning, with it I got an error because some of the functions from the include file were not added to the project.
I re-made the project, using a different package for my board/processor combination now which adds some other sources. So now it seems to work :)
Sorry for the noise (which reminds me: a "bloody beginners forum" would be nice ;) )
Christoph
-
Sorry. No work, more noise ;)
I've now added the complete project for inspection. I gues it's very simple but I don't get it ...
In the current version, compiling will work but with warnings for the 'implicit declaration of function 'ctl_at91sam7_get_mck_frequency' '.
When I uncomment line '//#include "ctl_api.h"' in 'main.c' and/or 'delay.c' I get an error:
---------------------------------------------------------------------
Find delay.c
Error ctl_api.h expected ';', ',' or ')' before numeric constant
---------------------------------------------------------------------
What is it? Please help ...
Christoph
Please sign in to leave a comment.
Comments
3 comments