Hi. I'm new to the Arduino platform, and I'm trying to compile the source code for ArduCam, but I'm getting a lot of errors...
I've downloaded the latest source files from the SVN, and I'm Using the latest Arduino software (1.0.5) on OS X 10.9.1
This is what I'm getting when compiling:
Expected class-name before '{' token
Using library EEPROM in folder: /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/EEPROM (pre-1.5)
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=155 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/variants/standard -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/libraries/EEPROM /var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp -o /var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp.o
In file included from /var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp:4:
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.h:78: error: expected class-name before '{' token
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.h:84: error: 'uint8_t' has not been declared
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.h:84: error: 'uint8_t' has not been declared
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.h:87: error: 'uint8_t' has not been declared
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.h:91: error: 'uint8_t' has not been declared
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.h:91: error: 'uint8_t' has not been declared
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.h:98: error: 'size_t' does not name a type
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.h:99: error: 'uint8_t' has not been declared
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.h:100: error: 'BetterStream' has not been declared
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.h:102: error: 'uint8_t' does not name a type
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp: In member function 'void OSD::init()':
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp:38: error: 'video_mode' was not declared in this scope
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp: In member function 'void OSD::setMode(int)':
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp:109: error: 'video_mode' was not declared in this scope
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp:110: error: 'video_center' was not declared in this scope
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp: In member function 'int OSD::getMode()':
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp:123: error: 'video_mode' was not declared in this scope
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp: In member function 'int OSD::getCenter()':
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp:138: error: 'video_center' was not declared in this scope
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp: At global scope:
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp:162: error: prototype for 'void OSD::setPanel(uint8_t, uint8_t)' does not match any in class 'OSD'
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.h:84: error: candidate is: void OSD::setPanel(int, int)
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp: In member function 'void OSD::openPanel()':
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp:177: error: 'row' was not declared in this scope
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp:177: error: 'col' was not declared in this scope
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp: In member function 'void OSD::closePanel()':
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp:206: error: 'row' was not declared in this scope
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp: At global scope:
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp:212: error: prototype for 'void OSD::openSingle(uint8_t, uint8_t)' does not match any in class 'OSD'
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.h:91: error: candidate is: void OSD::openSingle(int, int)
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp:236: error: no 'size_t OSD::write(uint8_t)' member function declared in class 'OSD'
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp:251: error: prototype for 'void OSD::control(uint8_t)' does not match any in class 'OSD'
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.h:87: error: candidate is: void OSD::control(int)
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.cpp:268: error: prototype for 'void OSD::write_NVM(int, uint8_t*)' does not match any in class 'OSD'
/var/folders/m2/qq4lftp52kv4r_yw3nvpthf00000gn/T/build43550929607134751.tmp/ArduCam_Max7456.h:99: error: candidate is: void OSD::write_NVM(int, int*)
Any ideas?
Replies
Solved!
Turned out to be a problem of not having the library files in the correct folder "Library". After placing the files there, it compiled, but then the size of the code was too big to fit on the minim osd amtel chip!
The solution was the to remove some parts of the code I don't need, like the "panRose" panel in the OSD_Panels source...
There is a great tutorial for newbies here: http://www.rcgroups.com/forums/showthread.php?t=1830845&page=4
Thanks for your contribution, Carmichael!