Teensy 3.2 compile problem

Status
Not open for further replies.

leftlife

New member
Hello! I am completely new here :) and I have one problem.

I following tutorial on youtube: https://www.youtube.com/watch?v=wqt55OAabVs and now I trying "12:02 Part 2-3 Playing Samples" When I export code http://prntscr.com/idu274 and paste in arduino compiler I have error: http://prntscr.com/idu2mz

Error code:

Code:
C:\Users\Vukasin\AppData\Local\Temp\arduino_build_949578/core\core.a(main.cpp.o): In function `main':

C:\Program Files (x86)\Arduino2018\hardware\teensy\avr\cores\teensy3/main.cpp:51: undefined reference to `setup'

C:\Program Files (x86)\Arduino2018\hardware\teensy\avr\cores\teensy3/main.cpp:53: undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status

Error compiling for board Teensy 3.2 / 3.1.

Previous sketch "test hardware" with bip bip sound working fine.

Can anyone helps meee :)

Thank you!
 
As the linker error says, you need to define two functions:
  • setup -- This is called once to allow you to initialize things;
  • loop -- This is called to do the stuff you want to do, and it is called continiously.
 
I suspect in pasting in the export from the gui, you deleted the latter part of the example sketch. Start again with a fresh copy of example "12:02 Part 2-3 Playing Samples" -- you'll see it has a setup() and loop(). Be careful as you paste in the export data from the gui.
 
Yes yes! :) there is a problem! I successfully compile this time! I thought code from export is enough, but now I saw mail idea what is export from GUI and what a must programming in arduino ide. Thank you very much Michael and Manitou for your time. Cya
 
Status
Not open for further replies.
Back
Top