sowbug / G35Arduino

An Arduino library for GE Color Effects G-35 holiday lights.
Other
64 stars 24 forks source link

Compilation fails for BasicExample #9

Closed robot-head closed 12 years ago

robot-head commented 12 years ago

I followed the directions here: https://github.com/sowbug/G35Arduino/blob/master/README.md

When I attempt to "verify" the sketch, I get the following compilation error:

G35Arduino/G35.cpp.o:(.rodata._ZTV3G35+0x4): undefined reference to __cxa_pure_virtual' G35Arduino/G35.cpp.o:(.rodata._ZTV3G35+0xc): undefined reference to__cxa_pure_virtual' G35Arduino/G35.cpp.o:(.rodata._ZTV3G35+0x1c): undefined reference to `__cxa_pure_virtual'

robot-head commented 12 years ago

This is with the Arduino 1.0 SDK, and a Teensy 2.0 target

sowbug commented 12 years ago

I just did a clean git clone and Verify for two targets (Leonardo and Uno) on Arduino 1.0, OSX. In both cases it succeeded. Can you tell me more about your environment?

The only thing remotely resembling a missing pure virtual is the default destructor in the G35 class. Can you try implementing it yourself and seeing whether that helps? Something like virtual ~G35() {} would do the trick. (I doubt that's the problem, though...)

robot-head commented 12 years ago

My environment is Arduino 1.0 on OSX 10.7.3.

robot-head commented 12 years ago

Weird, it compiled fine for the Uno, but not the Teensy :(

sowbug commented 12 years ago

That's a good clue. Can you turn on compilation output in the Arduino settings and paste what comes out after a clean build? I'm interested in seeing exactly which compiler is used for the '1286 in the Teensy. Perhaps the Teensyduino toolchain includes its own compiler.

On Mar 23, 2012, at 4:48 PM, robot-headreply@reply.github.com wrote:

Weird, it compiled fine for the Uno, but not the Teensy :(


Reply to this email directly or view it on GitHub: https://github.com/sowbug/G35Arduino/issues/9#issuecomment-4670072

robot-head commented 12 years ago

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/BasicExample.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/BasicExample.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/Cylon.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Cylon.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/G35.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/G35.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/G35String.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/G35String.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/G35StringGroup.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/G35StringGroup.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/Inchworm.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Inchworm.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/Meteorite.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Meteorite.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/Orbit.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Orbit.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/Orbiter.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Orbiter.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/PlusPrograms.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/PlusPrograms.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/Pulse.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Pulse.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/RedGreenChase.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/RedGreenChase.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/Stereo.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Stereo.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/StockPrograms.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/StockPrograms.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/Twinkle.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Twinkle.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino -I/Users/mattstone/Documents/Arduino/libraries/G35Arduino/utility /Users/mattstone/Documents/Arduino/libraries/G35Arduino/Worm.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Worm.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -DSERIALNUM=-109006926 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/keylayouts.c -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/keylayouts.c.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -DSERIALNUM=-138433000 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/malloc.c -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/malloc.c.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -DSERIALNUM=-1482219014 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/pins_teensy.c -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/pins_teensy.c.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -DSERIALNUM=-1774962648 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/usb.c -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/usb.c.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -DSERIALNUM=-724664291 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/WInterrupts.c -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/WInterrupts.c.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -DSERIALNUM=1910107926 -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/wiring.c -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/wiring.c.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/HardwareSerial.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/HardwareSerial.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/IPAddress.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/IPAddress.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/main.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/main.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/Print.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/Print.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/Stream.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/Stream.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/Tone.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/Tone.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/usb_api.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/usb_api.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/WMath.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/WMath.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega32u4 -DF_CPU=16000000L -MMD -DARDUINO=100 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy /Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy/WString.cpp -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/WString.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/keylayouts.c.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/malloc.c.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/pins_teensy.c.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/usb.c.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/WInterrupts.c.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/wiring.c.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/HardwareSerial.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/IPAddress.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/main.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/Print.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/Stream.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/Tone.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/usb_api.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/WMath.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/WString.cpp.o /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -Os -Wl,--gc-sections,--relax -mmcu=atmega32u4 -o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/BasicExample.cpp.elf /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/BasicExample.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Cylon.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/G35.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/G35String.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/G35StringGroup.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Inchworm.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Meteorite.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Orbit.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Orbiter.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/PlusPrograms.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Pulse.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/RedGreenChase.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Stereo.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/StockPrograms.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Twinkle.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/G35Arduino/Worm.cpp.o /var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp/core.a -L/var/folders/00/09qm0000h01000cxqpysvccm0016yh/T/build6925138863111091044.tmp -lm G35Arduino/G35.cpp.o:(.rodata._ZTV3G35+0x4): undefined reference to __cxa_pure_virtual' G35Arduino/G35.cpp.o:(.rodata._ZTV3G35+0xc): undefined reference to__cxa_pure_virtual' G35Arduino/G35.cpp.o:(.rodata._ZTV3G35+0x1c): undefined reference to `__cxa_pure_virtual'

sowbug commented 12 years ago

Interesting. I mistakenly thought you were using the Teensy++, but now that I see the command line specifies the atmega32u4, that's indeed the 2.0, just as you said. The reason that's interesting is that it's the same hardware I use (though I build it as the Leonardo, which is nearly identical hardware, just with different pin labelings).

Does this item shed any light on the problem? http://stackoverflow.com/questions/920500/what-is-the-purpose-of-cxa-pure-virtual

And did you have any luck defining the destructor?

robot-head commented 12 years ago

I sort of understand the issue, but I wasn't able to define a destructor and fix the issue. Can you reproduce the issue using the built-in Teensy 2.0 toolchain?

robot-head commented 12 years ago

I added this to G35.ccp: ... G35::G35() : lightcount(0) { } (start of addition) G35::~G35() { } (end of addition) bool G35::set_color_if_in_range(uint8_t position, uint8_t intensity, ...

Results in:

G35.cpp:19: error: definition of implicitly-declared 'G35::~G35()'

sowbug commented 12 years ago

You have to declare it in the header, too.

On Mar 26, 2012, at 2:30 PM, robot-headreply@reply.github.com wrote:

I added this to G35.ccp: ... G35::G35() : lightcount(0) { } (start of addition) G35::~G35() { } (end of addition) bool G35::set_color_if_in_range(uint8_t position, uint8_t intensity, ...

Results in:

G35.cpp:19: error: definition of implicitly-declared 'G35::~G35()'


Reply to this email directly or view it on GitHub: https://github.com/sowbug/G35Arduino/issues/9#issuecomment-4704708