Go Down

Topic: Error with New IDE Release (Read 2421 times) previous topic - next topic

FrankyMonez

Mar 17, 2015, 11:32 pm Last Edit: Mar 17, 2015, 11:34 pm by FrankyMonez
This program used to compile but all of a sudden since the new release it won't and throws this error:

Code: [Select]
Arduino: 1.6.1 (Windows 7), Board: "Arduino Uno"

Build options changed, rebuilding all

Using library SPI in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI

Using library Wire in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire

Using library Adafruit_GFX in folder: C:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_GFX (legacy)

Using library Adafruit_SSD1306 in folder: C:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_SSD1306 (legacy)



C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_GFX -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_SSD1306 C:\Users\Lonnie\AppData\Local\Temp\build4212809662157922850.tmp\SwitchBox_v4.cpp -o C:\Users\Lonnie\AppData\Local\Temp\build4212809662157922850.tmp\SwitchBox_v4.cpp.o

C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_GFX -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_SSD1306 -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\utility C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\SPI.cpp -o C:\Users\Lonnie\AppData\Local\Temp\build4212809662157922850.tmp\SPI\SPI.cpp.o

C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_GFX -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_SSD1306 -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\utility C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\Wire.cpp -o C:\Users\Lonnie\AppData\Local\Temp\build4212809662157922850.tmp\Wire\Wire.cpp.o

C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_GFX -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_SSD1306 -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\utility C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\utility\twi.c -o C:\Users\Lonnie\AppData\Local\Temp\build4212809662157922850.tmp\Wire\utility\twi.c.o

C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_GFX -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_SSD1306 -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_GFX\utility C:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_GFX\glcdfont.c -o C:\Users\Lonnie\AppData\Local\Temp\build4212809662157922850.tmp\Adafruit_GFX\glcdfont.c.o

C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_GFX -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_SSD1306 -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_GFX\utility C:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_GFX\Adafruit_GFX.cpp -o C:\Users\Lonnie\AppData\Local\Temp\build4212809662157922850.tmp\Adafruit_GFX\Adafruit_GFX.cpp.o

C:\Program Files (x86)\Arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10601 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_GFX -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_SSD1306 -IC:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_SSD1306\utility C:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_SSD1306\Adafruit_SSD1306.cpp -o C:\Users\Lonnie\AppData\Local\Temp\build4212809662157922850.tmp\Adafruit_SSD1306\Adafruit_SSD1306.cpp.o

C:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_SSD1306\Adafruit_SSD1306.cpp:433:6: error: prototype for 'void Adafruit_SSD1306::dim(boolean)' does not match any in class 'Adafruit_SSD1306'

 void Adafruit_SSD1306::dim(boolean dim) {

      ^

In file included from C:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_SSD1306\Adafruit_SSD1306.cpp:28:0:

C:\Users\Lonnie\Documents\Arduino\libraries\Adafruit_SSD1306\Adafruit_SSD1306.h:152:8: error: candidate is: void Adafruit_SSD1306::dim(uint8_t)

   void dim(uint8_t contrast);

        ^

Error compiling.


Here is a link to the code:

https://github.com/MrSTUDofCODE/SwitchBox-v3/blob/master/SwitchBox_v4/SwitchBox_v4.ino

THANKS!

PaulS

It looks like the dim() method is declared with one signature, and implemented with another. That isn't very bright. Fix the class so the declaration and implementation use the same signature.
The art of getting good answers lies in asking good questions.

FrankyMonez

How do I do that - I didnt write the library Adafruit Ind. did - here is a link to it

https://github.com/adafruit/Adafruit_SSD1306

PaulS

Did you look at that page? Did you see the comment for the header file?
The art of getting good answers lies in asking good questions.

FrankyMonez

No I didn't even notice that - I fixed it thanks!

rexino

PaulS

You write:

>Did you look at that page? Did you see the comment for the header file?<


Il would of been nice if you hade included the answer in your reply so other users don't have to search for it. I search far and wide and never find the header file you speak of. Still stuck with my dim() error.


MarkT

How do I do that - I didnt write the library Adafruit Ind. did - here is a link to it

https://github.com/adafruit/Adafruit_SSD1306
You've got the library installed, you can edit it till it compiles.

Then email a bug report to Adafruit.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

PaulS

Quote
Il would of been nice if you hade included the answer in your reply so other users don't have to search for it. I search far and wide and never find the header file you speak of. Still stuck with my dim() error.
The library at the link in reply #2 has already been fixed, so that the header file and source file now match. You need to update to the current version.
The art of getting good answers lies in asking good questions.

westfw

https://github.com/adafruit/Adafruit_SSD1306/commit/50f9ee06ec3e264ef8805c29b2030b45d2cafac7
Fixed back in Feb, 2015.  The 1.6.x IDEs updated the type definition of "boolean" to be be a C++ "bool" rather than a "uint8_t", breaking libraries like this that had been less than careful...

(You have to be careful to delete any old versions of the Library in your Documents Folder, so that the library manager will pick up a newer version off in Libraries.)

Go Up