Go Down

Topic: Compiler problem with main.cpp (Read 1 time) previous topic - next topic


Hi all,
I'm new here  and with Arduino :-)
And now my first issue rised up ...
I try to build up my first HW and SW to control a LCD dogm_lcd lib.
The code is just fine but I gett the following compiler error:

C:\arduino\arduino-0018\hardware\arduino\cores\arduino\main.cpp: In function 'int main()':

C:\arduino\arduino-0018\hardware\arduino\cores\arduino\main.cpp:5: error: 'init' was not declared in this scope

C:\arduino\arduino-0018\hardware\arduino\cores\arduino\main.cpp:7: error: 'setup' was not declared in this scope

C:\arduino\arduino-0018\hardware\arduino\cores\arduino\main.cpp:10: error: 'loop' was not declared in this scope

I have absolutely no glue what is wrong here.
could somebody give me some hints



The code is just fine but I gett the following compiler error:

If the compiler doesn't like the code, then, by what definition is it "just fine"?


ok than its may be not fine :-) at least I copied the original library code with the example file, assuming its fine and no error on "my" code appeared.
do you have any help for me ?


"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


The Arduino "manufactures" the main function. I'm guessing that you are providing one, and that there is no setup() function, no init() function, and no loop() function. These are required for any Arduino application.


sorry, he code is 1:1 copied from the following source:
extraced to:

Arduino SW version is 0018


Aug 18, 2010, 08:14 pm Last Edit: Aug 18, 2010, 08:16 pm by Eight Reason: 1
That's a library, so you need to create a normal sketch with a setup() and loop() then create an instance of dogm_lcd.

I suspect you're trying to run the library instead.

The dogm_lcd.h and .cpp files probably want to go into your Libraries folder. I'm guessing the .pde is the basic sketch that instances the library.


problem solved. There was a typo error made by copy paste  >:(
Thanks so far

Go Up